diff options
author | Kali Kaneko <kali@leap.se> | 2017-11-01 02:15:12 +0100 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-11-01 02:20:03 +0100 |
commit | b01ef289572d507a1f09d5f3c26c774564d7c8af (patch) | |
tree | ac683b01a4a6e68433470612e735f2e7f89960a8 /src/leap/bitmask/gui/app.py | |
parent | cee7f58b5ba8a5fd93391bced6a9560666ff7f72 (diff) |
[feature] restore with double-click
Diffstat (limited to 'src/leap/bitmask/gui/app.py')
-rw-r--r-- | src/leap/bitmask/gui/app.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/leap/bitmask/gui/app.py b/src/leap/bitmask/gui/app.py index 9823d293..44d1d80f 100644 --- a/src/leap/bitmask/gui/app.py +++ b/src/leap/bitmask/gui/app.py @@ -89,6 +89,7 @@ class WithTrayIcon(QDialog): self._createIcons() self._createActions() self._createTrayIcon() + self.trayIcon.activated.connect(self.iconActivated) self.setVPNStatus('off') self.setUpEventListener() self.trayIcon.show() @@ -130,6 +131,11 @@ class WithTrayIcon(QDialog): "&Quit", self, triggered=self.closeFromSystray) + def iconActivated(self, reason): + # can use .Trigger also for single click + if reason in (QSystemTrayIcon.DoubleClick, ): + self.showNormal() + def closeFromSystray(self): self.user_closed = True self.close() @@ -144,9 +150,9 @@ class WithTrayIcon(QDialog): if self.trayIcon.isVisible() and not self.user_closed: QMessageBox.information( self, "Systray", - "The program will keep running in the system tray. To " - "terminate the program, choose <b>Quit</b> in the " - "context menu of the system tray entry.") + "Bitmask will minimize to the system tray. " + "You can choose 'Quit' from the menu with a " + "right click on the icon.") self.hide() if not self.user_closed: event.ignore() |