From 699eb99b1092335ee681dacdc06e6bf9c89827ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Fri, 14 Jun 2013 11:19:50 -0300 Subject: Make both clicks behave the same in the systray --- src/leap/gui/mainwindow.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/leap/gui/mainwindow.py') 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): """ -- cgit v1.2.3