remove the possibility to configure systray if module is not available. Fixes #5345

This commit is contained in:
Yann Leboulanger 2009-10-28 11:11:55 +01:00
parent 52c788795a
commit 31d2bcbe7d
2 changed files with 4 additions and 0 deletions

View file

@ -314,6 +314,8 @@ class PreferencesWindow:
systray_combobox.set_active(1)
else:
systray_combobox.set_active(2)
if not gajim.interface.systray_capabilities:
systray_combobox.set_sensitive(False)
# sounds
if gajim.config.get('sounds_on'):

View file

@ -3609,6 +3609,8 @@ class Interface:
self.systray_capabilities = systray.HAS_SYSTRAY_CAPABILITIES
if self.systray_capabilities:
self.systray = systray.Systray()
else:
gajim.config.set('trayicon', 'never')
path_to_file = os.path.join(gajim.DATA_DIR, 'pixmaps', 'gajim.png')
pix = gtk.gdk.pixbuf_new_from_file(path_to_file)