[elrodeo] add must sounds in systray context menu. fixes #2626

This commit is contained in:
Yann Leboulanger 2006-11-04 01:42:29 +00:00
parent fb3b1520d8
commit 354b6fd1c5
1 changed files with 6 additions and 0 deletions

View File

@ -104,6 +104,7 @@ class Systray:
'single_message_menuitem') 'single_message_menuitem')
status_menuitem = self.xml.get_widget('status_menu') status_menuitem = self.xml.get_widget('status_menu')
join_gc_menuitem = self.xml.get_widget('join_gc_menuitem') join_gc_menuitem = self.xml.get_widget('join_gc_menuitem')
sounds_mute_menuitem = self.xml.get_widget('sounds_mute_menuitem')
if self.single_message_handler_id: if self.single_message_handler_id:
single_message_menuitem.handler_disconnect( single_message_menuitem.handler_disconnect(
@ -220,6 +221,7 @@ class Systray:
account) account)
break # No other connected account break # No other connected account
sounds_mute_menuitem.set_active(not gajim.config.get('sounds_on'))
if os.name == 'nt' and gtk.pygtk_version >= (2, 10, 0) and\ if os.name == 'nt' and gtk.pygtk_version >= (2, 10, 0) and\
gtk.gtk_version >= (2, 10, 0): gtk.gtk_version >= (2, 10, 0):
self.systray_context_menu.popup(None, None, self.systray_context_menu.popup(None, None,
@ -238,6 +240,10 @@ class Systray:
for event in events[account][jid]: for event in events[account][jid]:
gajim.interface.handle_event(account, jid, event.type_) gajim.interface.handle_event(account, jid, event.type_)
def on_sounds_mute_menuitem_activate(self, widget):
gajim.config.set('sounds_on', not widget.get_active())
gajim.interface.save_config()
def on_show_roster_menuitem_activate(self, widget): def on_show_roster_menuitem_activate(self, widget):
win = gajim.interface.roster.window win = gajim.interface.roster.window
win.present() win.present()