[Dicson] Don't always show Tray icon if "only when pending events" option is used. Fixes #5921

This commit is contained in:
Yann Leboulanger 2010-09-18 23:06:36 +02:00
parent 0b448cfb10
commit 05c7f05dd9
2 changed files with 5 additions and 3 deletions

View File

@ -847,12 +847,10 @@ class PreferencesWindow:
gajim.config.set('trayicon', 'on_event')
gajim.interface.systray_enabled = True
gajim.interface.systray.show_icon()
gajim.interface.systray.set_img()
else:
gajim.config.set('trayicon', 'always')
gajim.interface.systray_enabled = True
gajim.interface.systray.show_icon()
gajim.interface.systray.set_img()
def on_advanced_notifications_button_clicked(self, widget):
dialogs.AdvancedNotificationsWindow()

View File

@ -97,7 +97,6 @@ class StatusIcon:
self.on_status_icon_size_changed)
self.set_img()
self.status_icon.set_visible(True)
self.subscribe_events()
def on_status_icon_right_clicked(self, widget, event_button, event_time):
@ -131,9 +130,14 @@ class StatusIcon:
"""
if not gajim.interface.systray_enabled:
return
if gajim.config.get('trayicon') == 'always':
self.status_icon.set_visible(True)
if gajim.events.get_nb_systray_events():
self.status_icon.set_visible(True)
self.status_icon.set_blinking(True)
else:
if gajim.config.get('trayicon') == 'on_event':
self.status_icon.set_visible(False)
self.status_icon.set_blinking(False)
image = gajim.interface.jabber_state_images[self.statusicon_size][