diff options
author | Kali Kaneko <kali@leap.se> | 2015-08-24 15:24:16 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2015-08-24 17:16:35 -0400 |
commit | 28d176a2376d3ab41812ca31601d5b5195086d34 (patch) | |
tree | 6c704bd89749ea82db41eee0cd084e7bc6903849 | |
parent | eb5184845818d9440423251450c6bdcc44e5156d (diff) |
[pkg] add icon for mail-only builds
-rw-r--r-- | data/images/menubar-mask-icon.png | bin | 0 -> 1818 bytes | |||
-rw-r--r-- | data/resources/icons.qrc | 1 | ||||
-rw-r--r-- | src/leap/bitmask/gui/mainwindow.py | 9 |
3 files changed, 9 insertions, 1 deletions
diff --git a/data/images/menubar-mask-icon.png b/data/images/menubar-mask-icon.png Binary files differnew file mode 100644 index 00000000..a478cc96 --- /dev/null +++ b/data/images/menubar-mask-icon.png diff --git a/data/resources/icons.qrc b/data/resources/icons.qrc index 7fda6197..177a80ec 100644 --- a/data/resources/icons.qrc +++ b/data/resources/icons.qrc @@ -3,6 +3,7 @@ <!-- used as window icon --> <file>../images/mask-icon.png</file> + <file>../images/menubar-mask-icon.png</file> <!-- round status icons --> <file>../images/black/off.svg</file> diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index 44a048e0..312048ba 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -73,11 +73,13 @@ if HAS_MAIL: from leap.bitmask.services.mail import conductor as mail_conductor from leap.bitmask.services import MX_SERVICE - QtDelayedCall = QtCore.QTimer.singleShot logger = get_logger() +if not HAS_EIP: + BITMASK_MAIL_ONLY_ICON = ":/images/menubar-mask-icon.png" + class MainWindow(QtGui.QMainWindow, SignalTracker): """ @@ -874,11 +876,16 @@ class MainWindow(QtGui.QMainWindow, SignalTracker): systrayMenu.addAction(self._action_mail_status) systrayMenu.addSeparator() systrayMenu.addAction(self.ui.action_quit) + self._systray = SysTray(self) self._systray.setContextMenu(systrayMenu) if HAS_EIP: self._systray.setIcon(self._eip_status.ERROR_ICON_TRAY) + else: + mail_status_icon = QtGui.QPixmap(BITMASK_MAIL_ONLY_ICON) + self._systray.setIcon(mail_status_icon) + self._systray.setVisible(True) self._systray.activated.connect(self._tray_activated) |