diff options
author | Kali Kaneko <kali@leap.se> | 2013-09-18 17:12:13 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2013-09-18 17:12:13 -0400 |
commit | 006f362af526e9283c698805100e54c18b2be390 (patch) | |
tree | d60ebf2b0720091ec08a53211ddba438fd19e713 /src/leap/bitmask/gui/mainwindow.py | |
parent | 956878cd1c33d2a7325a9f627b99190a544a35b9 (diff) | |
parent | c48ee72ba2e0b016cb6919a3197831ef4292056d (diff) |
Merge remote-tracking branch 'ivan-github/feature/3792_systray-texts-improvements' into develop
Diffstat (limited to 'src/leap/bitmask/gui/mainwindow.py')
-rw-r--r-- | src/leap/bitmask/gui/mainwindow.py | 39 |
1 files changed, 10 insertions, 29 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index 1dbf39ef..37bbf1c4 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -251,30 +251,14 @@ class MainWindow(QtGui.QMainWindow): self._systray = None - self._action_eip_provider = QtGui.QAction( - self.tr("No default provider"), self) - self._action_eip_provider.setEnabled(False) - - self._action_eip_status = QtGui.QAction( - self.tr("Encrypted Internet is OFF"), - self) - self._action_eip_status.setEnabled(False) - self._status_panel.set_action_eip_status( - self._action_eip_status) - - self._action_mail_status = QtGui.QAction( - self.tr("Encrypted Mail is OFF"), self) + self._action_mail_status = QtGui.QAction(self.tr("Mail is OFF"), self) self._action_mail_status.setEnabled(False) - self._status_panel.set_action_mail_status( - self._action_mail_status) + self._status_panel.set_action_mail_status(self._action_mail_status) - self._action_eip_startstop = QtGui.QAction( - self.tr("Turn OFF"), self) - self._action_eip_startstop.triggered.connect( - self._stop_eip) + self._action_eip_startstop = QtGui.QAction(self.tr("Turn ON"), self) + self._action_eip_startstop.triggered.connect(self._stop_eip) self._action_eip_startstop.setEnabled(False) - self._status_panel.set_action_eip_startstop( - self._action_eip_startstop) + self._status_panel.set_action_eip_startstop(self._action_eip_startstop) self._action_preferences = QtGui.QAction(self.tr("Preferences"), self) self._action_preferences.triggered.connect(self._show_preferences) @@ -594,8 +578,6 @@ class MainWindow(QtGui.QMainWindow): "no default provider configured") return - self._action_eip_provider.setText(default_provider) - self._enabled_services = self._settings.get_enabled_services( default_provider) @@ -626,9 +608,11 @@ class MainWindow(QtGui.QMainWindow): systrayMenu = QtGui.QMenu(self) systrayMenu.addAction(self._action_visible) systrayMenu.addSeparator() - systrayMenu.addAction(self._action_eip_provider) - systrayMenu.addAction(self._action_eip_status) - systrayMenu.addAction(self._action_eip_startstop) + + eip_menu = systrayMenu.addMenu(self.tr("Encrypted Internet is OFF")) + eip_menu.addAction(self._action_eip_startstop) + self._status_panel.set_eip_status_menu(eip_menu) + systrayMenu.addAction(self._action_mail_status) systrayMenu.addSeparator() systrayMenu.addAction(self._action_preferences) @@ -1242,9 +1226,6 @@ class MainWindow(QtGui.QMainWindow): provider = "%s@%s" % (self._logged_user, provider) self._status_panel.set_provider(provider) - - self._action_eip_provider.setText(provider_config.get_domain()) - self._status_panel.eip_started() # XXX refactor into status_panel method? |