From 2a59b00ddc95426e02ed060fa4a37a3eaee6712c Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Wed, 4 Oct 2006 23:34:12 +0000 Subject: [PATCH] fix sth from prev commit --- src/systray.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/systray.py b/src/systray.py index 50c739944..607739756 100644 --- a/src/systray.py +++ b/src/systray.py @@ -217,7 +217,8 @@ class Systray: account) break # No other connected account - if gtk.pygtk_version >= (2, 10, 0) and gtk.gtk_version >= (2, 10, 0): + 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, event_time, self.status_icon) @@ -277,7 +278,9 @@ class Systray: def on_clicked(self, widget, event): self.on_tray_leave_notify_event(widget, None) - if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1: # Left click + if event.type != gtk.gdk.BUTTON_PRESS: + return + if event.button == 1: # Left click self.on_left_click() elif event.button == 2: # middle click self.on_middle_click()