Fix showing system tray icon in windows
This commit is contained in:
parent
2030ba5e84
commit
38fc6ba9e3
|
@ -78,11 +78,15 @@ class SystemTray(component.Component):
|
|||
pkg_resources.resource_filename("deluge.ui.gtkui",
|
||||
"glade/tray_menu.glade"))
|
||||
|
||||
try:
|
||||
self.tray = gtk.status_icon_new_from_icon_name("deluge")
|
||||
except:
|
||||
log.warning("Update PyGTK to 2.10 or greater for SystemTray..")
|
||||
return
|
||||
if deluge.common.windows_check():
|
||||
self.tray = gtk.status_icon_new_from_pixbuf(
|
||||
deluge.common.get_logo(32))
|
||||
else:
|
||||
try:
|
||||
self.tray = gtk.status_icon_new_from_icon_name("deluge")
|
||||
except:
|
||||
log.warning("Update PyGTK to 2.10 or greater for SystemTray..")
|
||||
return
|
||||
|
||||
self.tray.connect("activate", self.on_tray_clicked)
|
||||
self.tray.connect("popup-menu", self.on_tray_popup)
|
||||
|
|
Loading…
Reference in New Issue