From 546eb9f042d975f5c173d5b3ae3c433137268a29 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Tue, 26 Jul 2016 20:36:50 +0300 Subject: [PATCH] fix #6 --- toxygen/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/toxygen/main.py b/toxygen/main.py index 6348bab..f5622f6 100644 --- a/toxygen/main.py +++ b/toxygen/main.py @@ -226,6 +226,10 @@ class Toxygen: self.p = UnlockAppScreen(toxencryptsave.ToxEncryptSave.get_instance(), correct_pass) self.p.show() + def tray_activated(reason): + if reason == QtGui.QSystemTrayIcon.DoubleClick: + show_window() + m.connect(show, QtCore.SIGNAL("triggered()"), show_window) m.connect(exit, QtCore.SIGNAL("triggered()"), lambda: app.exit()) m.connect(m, QtCore.SIGNAL("aboutToShow()"), lambda: m.aboutToShow()) @@ -235,6 +239,7 @@ class Toxygen: self.tray.setContextMenu(m) self.tray.show() + self.tray.activated.connect(tray_activated) self.ms.show()