149
149
# icon = gtk.gdk.pixbuf_new_from_file(self.specto.PATH + 'icons/notifier/faded/folder.png' )
150
150
# elif type == 3:#system process
151
151
# icon = gtk.gdk.pixbuf_new_from_file(self.specto.PATH + 'icons/notifier/faded/process.png' )
152
# ... and of course the port watch
152
153
# self.model.set_value(self.iter[id], 1, icon)
154
155
if self.specto.watch_db[id].updated == False:
178
179
# icon = gtk.gdk.pixbuf_new_from_file(self.specto.PATH + 'icons/notifier/faded/folder.png' )
179
180
# elif type == 3:#system process
180
181
# icon = gtk.gdk.pixbuf_new_from_file(self.specto.PATH + 'icons/notifier/faded/process.png' )
182
# ... and of course the port watch
181
183
# self.model.set_value(self.iter[i], 1, icon)
183
185
def refresh(self, *widget):
237
239
icon = self.specto.icon_theme.load_icon("folder", 22, 0)
238
240
elif type == 3:#system process
239
241
icon = self.specto.icon_theme.load_icon("applications-system", 22, 0)
243
icon = self.specto.icon_theme.load_icon("network-transmit-receive", 22, 0)
240
244
if self.model.iter_is_valid(self.iter[id]):
241
245
self.model.set_value(self.iter[id], 1, icon)
283
287
if self.specto.watch_db[id].updated == True:
285
289
#FIXME: needs to set the gtk sensitivity to True here
291
icon = self.specto.icon_theme.load_icon("network-transmit-receive", 22, 0)
292
if self.specto.watch_db[id].updated == True:
294
#FIXME: needs to set the gtk sensitivity to True here
286
295
if self.model.iter_is_valid(self.iter[id]):
287
296
self.model.set_value(self.iter[id], 1, icon)
288
297
#FIXME: NEEDS GTK SENSITIVITY! this section below is for hardcoded transparent icons, will not be necessary when we figure out how to make cell contents insensitive properly
323
333
icon = self.specto.icon_theme.load_icon("folder", 22, 0)
324
334
elif type == 3:#system process
325
335
icon = self.specto.icon_theme.load_icon("applications-system", 22, 0)
337
icon = self.specto.icon_theme.load_icon("network-transmit-receive", 22, 0)
326
338
# if self.model.iter_is_valid(self.iter[id]):
327
339
# self.model.set_value(self.iter[id], 1, icon)
336
348
# icon = gtk.gdk.pixbuf_new_from_file(self.specto.PATH + 'icons/notifier/faded/folder.png' )
337
349
# elif type == 3:
338
350
# icon = gtk.gdk.pixbuf_new_from_file(self.specto.PATH + 'icons/notifier/faded/process.png' )
351
# ... and of course the port watch
340
353
self.iter[i] = self.model.insert_before(None, None)
341
354
self.model.set_value(self.iter[i], 0, 1)
448
462
self.lblProcessLastUpdateText.set_label(selected.last_updated)
449
463
self.process_info_table.show()
450
464
self.wTree.get_widget("imgWatch").set_from_pixbuf(self.specto.icon_theme.load_icon("applications-system", 64, 0))
466
elif selected.type == 4:
467
self.lblPortNameText.set_label(selected.name)
468
self.lblPortName.set_label(selected.port)
469
self.lblPortName.set_ellipsize(pango.ELLIPSIZE_START)#shorten the string if too long
470
self.lblPortLastUpdateText.set_label(selected.last_updated)
471
self.port_info_table.show()
472
self.wTree.get_widget("imgWatch").set_from_pixbuf(self.specto.icon_theme.load_icon("network-transmit-receive", 64, 0))
453
475
self.wTree.get_widget("edit").set_sensitive(False)
460
482
self.web_info_table.hide()
461
483
self.mail_info_table.hide()
462
484
self.file_info_table.hide()
463
self.process_info_table.hide()
485
self.process_info_table.hide()
486
self.port_info_table.hide()
465
488
def open_watch(self, *args):
891
914
self.process_info_table.attach(self.lblProcessName, 1, 2, 2, 3)
893
916
vbox_info.pack_start(self.process_info_table, False, False, 0)
921
self.port_info_table = gtk.Table(rows=3, columns=2, homogeneous=False)
922
self.port_info_table.set_col_spacings(6)
923
self.port_info_table.set_row_spacings(6)
926
lblName = gtk.Label(_("<b>Name:</b>"))
927
lblName.set_alignment(xalign=0.0, yalign=0.5)
928
lblName.set_use_markup(True)
930
self.port_info_table.attach(lblName, 0, 1, 0, 1)
932
self.lblPortNameText = gtk.Label()
933
self.lblPortNameText.set_alignment(xalign=0.0, yalign=0.5)
934
self.lblPortNameText.show()
935
self.port_info_table.attach(self.lblPortNameText,1, 2, 0, 1)
938
lblLastUpdate = gtk.Label(_("<b>Last Updated:</b>"))
939
lblLastUpdate.set_alignment(xalign=0.0, yalign=0.5)
940
lblLastUpdate.set_use_markup(True)
942
self.port_info_table.attach(lblLastUpdate,0, 1, 1, 2)
944
self.lblPortLastUpdateText = gtk.Label()
945
self.lblPortLastUpdateText.set_alignment(xalign=0.0, yalign=0.5)
946
self.lblPortLastUpdateText.show()
947
self.port_info_table.attach(self.lblPortLastUpdateText,1, 2, 1, 2)
950
lblPortName = gtk.Label(_("<b>Port:</b>"))
951
lblPortName.set_alignment(xalign=0.0, yalign=0.5)
952
lblPortName.set_use_markup(True)
954
self.port_info_table.attach(lblPortName, 0, 1, 2, 3)
956
self.lblPortName = gtk.Label()
957
self.lblPortName.set_alignment(xalign=0.0, yalign=0.5)
958
self.lblPortName.show()
959
self.port_info_table.attach(self.lblPortName, 1, 2, 2, 3)
961
vbox_info.pack_start(self.port_info_table, False, False, 0)
895
966
def show_add_watch(self, widget):
896
967
""" Call the main function to show the add watch window. """