summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/leap/app.py2
-rw-r--r--src/leap/baseapp/systray.py14
2 files changed, 11 insertions, 5 deletions
diff --git a/src/leap/app.py b/src/leap/app.py
index 341f6a6e..a1251ca8 100644
--- a/src/leap/app.py
+++ b/src/leap/app.py
@@ -36,7 +36,7 @@ def main():
console.setFormatter(formatter)
logger.addHandler(console)
- logger.debug(opts)
+ #logger.debug(opts)
logger.info('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
logger.info('LEAP client version %s', VERSION)
logger.info('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
diff --git a/src/leap/baseapp/systray.py b/src/leap/baseapp/systray.py
index d5d44f61..cc5d89df 100644
--- a/src/leap/baseapp/systray.py
+++ b/src/leap/baseapp/systray.py
@@ -100,6 +100,10 @@ class StatusAwareTrayIconMixin(object):
self.setIcon('disconnected')
self.trayIcon.setContextMenu(self.trayIconMenu)
+ #self.trayIconMenu.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
+ #self.trayIconMenu.customContextMenuRequested.connect(
+ #self.on_context_menu)
+
def bad(self):
logger.error('this should not be called')
@@ -178,12 +182,14 @@ class StatusAwareTrayIconMixin(object):
handles left click, left double click
showing the trayicon menu
"""
- #XXX there's a bug here!
- #menu shows on (0,0) corner first time,
- #until double clicked at least once.
if reason in (QtGui.QSystemTrayIcon.Trigger,
QtGui.QSystemTrayIcon.DoubleClick):
- self.trayIconMenu.show()
+ context_menu = self.trayIcon.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.
+ context_menu.exec_(self.trayIcon.geometry().center())
@QtCore.pyqtSlot()
def onTimerTick(self):