def statusIconInit(self): if self.statusIconMode == 2: useAppIndicator = ui.useAppIndicator if useAppIndicator: try: import scal3.ui_gtk.starcal_appindicator except (ImportError, ValueError): useAppIndicator = False if useAppIndicator: from scal3.ui_gtk.starcal_appindicator import ( IndicatorStatusIconWrapper, ) self.sicon = IndicatorStatusIconWrapper(self) else: self.sicon = gtk.StatusIcon() ##self.sicon.set_blinking(True) ## ^ for Alarms ## some problem with gnome-shell #self.sicon.set_name("starcal") # Warning: g_object_notify: object class `GtkStatusIcon" # has no property named `name" self.sicon.set_title(core.APP_DESC) self.sicon.set_visible(True) # is needed? self.sicon.connect( "button-press-event", self.statusIconButtonPress, ) self.sicon.connect("activate", self.statusIconClicked) self.sicon.connect("popup-menu", self.statusIconPopup) #self.sicon.set_from_stock(gtk.STOCK_HOME) else: self.sicon = None
def statusIconInit(self): if self.statusIconMode == 2: useAppIndicator = ui.useAppIndicator if useAppIndicator: try: from gi.repository import AppIndicator3 as appIndicator except ImportError: useAppIndicator = False if useAppIndicator: from scal3.ui_gtk.starcal_appindicator import IndicatorStatusIconWrapper self.sicon = IndicatorStatusIconWrapper(self) else: self.sicon = gtk.StatusIcon() ##self.sicon.set_blinking(True) ## for Alarms ## some problem with gnome-shell #self.sicon.set_name('starcal') ## Warning: g_object_notify: object class `GtkStatusIcon' has no property named `name' self.sicon.set_title(core.APP_DESC) self.sicon.set_visible(True) ## is needed ???????? self.sicon.connect('button-press-event', self.statusIconButtonPress) self.sicon.connect('activate', self.statusIconClicked) self.sicon.connect('popup-menu', self.statusIconPopup) #self.sicon.set_from_stock(gtk.STOCK_HOME) else: self.sicon = None