summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-06-14 11:19:50 -0300
committerTomás Touceda <chiiph@leap.se>2013-06-14 11:19:50 -0300
commit699eb99b1092335ee681dacdc06e6bf9c89827ef (patch)
treef03fd2e57da9473524102fa86a6045af9d207b3f /src/leap
parent561e7bc90f21efe5f86be7a842c283f4b7fa7610 (diff)
Make both clicks behave the same in the systray
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/gui/mainwindow.py23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py
index 90e74823..c58cd4e3 100644
--- a/src/leap/gui/mainwindow.py
+++ b/src/leap/gui/mainwindow.py
@@ -529,18 +529,17 @@ class MainWindow(QtGui.QMainWindow):
self.tr("Show Main Window"),
self.tr("Hide Main Window"))[int(visible)]
- if reason != QtGui.QSystemTrayIcon.Context:
- # set labels
- visible = self.isVisible()
- self._action_visible.setText(get_action(visible))
-
- context_menu = self._systray.contextMenu()
- # for some reason, context_menu.show()
- # is failing in a way beyond my understanding.
- # (not working the first time it's clicked).
- # this works however.
- # XXX in osx it shows some glitches.
- context_menu.exec_(self._systray.geometry().center())
+ # set labels
+ visible = self.isVisible()
+ self._action_visible.setText(get_action(visible))
+
+ context_menu = self._systray.contextMenu()
+ # for some reason, context_menu.show()
+ # is failing in a way beyond my understanding.
+ # (not working the first time it's clicked).
+ # this works however.
+ # XXX in osx it shows some glitches.
+ context_menu.exec_(self._systray.geometry().center())
def _toggle_visible(self):
"""