Skip to content
Snippets Groups Projects
Commit ee390174 authored by nkour's avatar nkour
Browse files

add hide this menuitem for systray menu in windows. GTK/win32 SUCKS. do not...

add hide this menuitem for systray menu in windows. GTK/win32 SUCKS. do not ever use it for your own project unless it is something trivial
parent 7491d1af
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,8 @@ class Systray:
self.single_message_handler_id = None
self.new_chat_handler_id = None
self.t = None
# click somewhere else does not popdown menu. workaround this.
self.added_hide_menuitem = False
self.img_tray = gtk.Image()
self.status = 'offline'
self.xml = gtkgui_helpers.get_glade('systray_context_menu.glade')
......@@ -222,10 +224,18 @@ class Systray:
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\
gtk.gtk_version >= (2, 10, 0):
self.systray_context_menu.popup(None, None,
gtk.status_icon_position_menu, event_button,
if os.name == 'nt':
# see http://bugzilla.gnome.org/show_bug.cgi?id=377349
#FIXME: until it is fixed, put under mouse coordinates
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment