~geod/indicator-workspaces/main

« back to all changes in this revision

Viewing changes to indicator-workspaces

  • Committer: George Dumitrescu
  • Date: 2010-08-28 13:36:14 UTC
  • Revision ID: george@george-laptop-20100828133614-ldzdmfrgg0qe1k48
bug fix - not showing icon

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
        self.ind = appindicator.Indicator ("example-simple-client", "indicator-messages", appindicator.CATEGORY_APPLICATION_STATUS)
15
15
        self.ind.set_status (appindicator.STATUS_ACTIVE)
16
16
        self.ind.set_attention_icon ("indicator-messages-new")
17
 
        self.ind.set_icon("/usr/share/indicator-workspaces/workspaces.svg")
 
17
        self.ind.set_icon("workspaces")
18
18
        
19
19
        self.scr = wnck.screen_get_default()
20
20
        self.scr.force_update()
23
23
            gtk.main_iteration()
24
24
            
25
25
        self.initialize()
26
 
        self.ind.set_icon("/usr/share/indicator-workspaces/workspace-%d.svg" % (self.active_desktop + 1))
 
26
        self.ind.set_icon("workspaces-%d" % (self.active_desktop + 1))
27
27
        if self.is_virtual:
28
28
            self.scr.connect('viewports-changed', self.ws_changed)
29
29
        else:
88
88
            
89
89
            
90
90
        sepr = gtk.SeparatorMenuItem()
 
91
        sepr.show()
91
92
        self.menu.append(sepr)
92
93
        
93
94
        pref = gtk.ImageMenuItem(gtk.STOCK_PREFERENCES)
132
133
    def ws_changed(self, scrm, opt = False):
133
134
        # TODO: optimise
134
135
        self.clear()
135
 
        self.ind.set_icon("/usr/share/indicator-workspaces/workspace-%d.svg" % (self.active_desktop + 1))
 
136
        self.ind.set_icon("workspace-%d" % (self.active_desktop + 1))
136
137
        if not self.aradio[self.active_desktop].get_active():
137
138
            self.aradio[self.active_desktop].set_active(True)
138
139
            
143
144
    
144
145
    def __init__(self):
145
146
        super(WorkspacesPreference, self).__init__()
146
 
        self.set_size_request(250, 200)
 
147
        self.set_size_request(250, 100)
147
148
        vbox = gtk.VBox(False, 2)
 
149
        
 
150
        hRows = gtk.HBox(False,2)
 
151
        lRows = gtk.Label('Rows:')
 
152
        hRows.add(lRows)
 
153
        nRows = gtk.SpinButton()
 
154
        nRows.set_value(1)
 
155
        nRows.set_range(1, 3)
 
156
        hRows.add(nRows)
 
157
        vbox.add(hRows)
 
158
        
 
159
        hCols = gtk.HBox(False,2)
 
160
        lCols = gtk.Label('Cols:')
 
161
        hCols.add(lCols)
 
162
        vbox.add(hCols)
 
163
        
148
164
        self.add(vbox)
149
165
        self.show_all()
150
166