Commit 28878b11 authored by Yann Leboulanger's avatar Yann Leboulanger

fix showing of systray popup menu under Windows. fixes #3611

parent 4f4e9a37
......@@ -247,21 +247,17 @@ class Systray:
sounds_mute_menuitem.set_active(not gajim.config.get('sounds_on'))
if os.name == 'nt':
if os.name == 'nt':
if gtk.pygtk_version >= (2, 10, 0) and gtk.gtk_version >= (2, 10, 0):
if self.added_hide_menuitem is False:
self.systray_context_menu.prepend(gtk.SeparatorMenuItem())
item = gtk.MenuItem(_('Hide this menu'))
self.systray_context_menu.prepend(item)
self.added_hide_menuitem = True
self.systray_context_menu.popup(None, None,
gtk.status_icon_position_menu, event_button,
event_time, self.status_icon)
else: # GNU and Unices
self.systray_context_menu.popup(None, None, None, event_button,
event_time)
self.systray_context_menu.prepend(gtk.SeparatorMenuItem())
item = gtk.MenuItem(_('Hide this menu'))
self.systray_context_menu.prepend(item)
self.added_hide_menuitem = True
self.systray_context_menu.show_all()
self.systray_context_menu.popup(None, None, None, event_button,
event_time)
def on_show_all_events_menuitem_activate(self, widget):
events = gajim.events.get_systray_events()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment