summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/gui')
-rw-r--r--src/leap/bitmask/gui/mainwindow.py18
-rw-r--r--src/leap/bitmask/gui/wizard.py5
2 files changed, 11 insertions, 12 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index 653ebc35..8127c1f6 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -206,6 +206,9 @@ class MainWindow(QtGui.QMainWindow):
self._finally_quitting = False
self._system_quit = False
+ # Used to differentiate between a real quit and a close to tray
+ self._close_to_tray = True
+
self._backend_connected_signals = []
self._backend_connect()
@@ -229,9 +232,6 @@ class MainWindow(QtGui.QMainWindow):
self.raise_window.connect(self._do_raise_mainwindow)
- # Used to differentiate between real quits and close to tray
- self._really_quit = False
-
self._systray = None
# XXX separate actions into a different module.
@@ -1144,7 +1144,7 @@ class MainWindow(QtGui.QMainWindow):
return
if QtGui.QSystemTrayIcon.isSystemTrayAvailable() and \
- not self._really_quit:
+ self._close_to_tray:
self._ensure_invisible()
e.ignore()
return
@@ -1889,10 +1889,9 @@ class MainWindow(QtGui.QMainWindow):
"""
Stop services and cancel ongoing actions (if any).
"""
- logger.debug('About to quit, doing cleanup.')
+ logger.debug('Stopping services...')
self._cancel_ongoing_defers()
-
self._services_being_stopped = set(('imap', 'eip'))
imap_stopped = lambda: self._remove_service('imap')
@@ -1921,9 +1920,10 @@ class MainWindow(QtGui.QMainWindow):
if self._quitting:
return
- autostart.set_autostart(False)
-
self._quitting = True
+ self._close_to_tray = False
+ logger.debug('Quitting...')
+ autostart.set_autostart(False)
# first thing to do quitting, hide the mainwindow and show tooltip.
self.hide()
@@ -1942,8 +1942,6 @@ class MainWindow(QtGui.QMainWindow):
# Set this in case that the app is hidden
QtGui.QApplication.setQuitOnLastWindowClosed(True)
- self._really_quit = True
-
if not self._backend.online:
self.final_quit()
return
diff --git a/src/leap/bitmask/gui/wizard.py b/src/leap/bitmask/gui/wizard.py
index 498e8501..8182228d 100644
--- a/src/leap/bitmask/gui/wizard.py
+++ b/src/leap/bitmask/gui/wizard.py
@@ -672,8 +672,9 @@ class Wizard(QtGui.QWizard):
Loads the services that the provider provides into the UI for
the user to enable or disable.
"""
- self.ui.grpServices.setTitle(
- self.tr("Services by {0}").format(self._provider_details['domain']))
+ title = self.tr("Services by {0}").format(
+ self._provider_details['domain'])
+ self.ui.grpServices.setTitle(title)
services = get_supported(self._provider_details['services'])