From 55630c58c072d4f55852629d22cff80aa5835f72 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Thu, 26 Oct 2017 00:50:22 +0200 Subject: [feature] add tooltip --- src/leap/bitmask/gui/app.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/leap/bitmask') diff --git a/src/leap/bitmask/gui/app.py b/src/leap/bitmask/gui/app.py index 8f763579..283e5a09 100644 --- a/src/leap/bitmask/gui/app.py +++ b/src/leap/bitmask/gui/app.py @@ -91,14 +91,19 @@ class WithTrayIcon(QDialog): def setVPNStatus(self, status): seticon = self.trayIcon.setIcon + settip = self.trayIcon.setToolTip if status == 'off': seticon(self.ICON_OFF) + settip('Off') elif status == 'on': seticon(self.ICON_ON) + settip('On') elif status == 'starting': seticon(self.ICON_WAIT) + settip('Starting') elif status == 'stopping': seticon(self.ICON_WAIT) + settip('Stopping') def setUpEventListener(self): leap_events.register(catalog.VPN_STATUS_CHANGED, self._handle_vpn_event) @@ -116,7 +121,7 @@ class WithTrayIcon(QDialog): self.ICON_OFF = QIcon(QPixmap(TRAY_ICONS[2])) def _createTrayIcon(self): - self.trayIcon = QSystemTrayIcon(self) + self.trayIcon = QSystemTrayIcon(self) class BrowserWindow(QWebView, WithTrayIcon): -- cgit v1.2.3