summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2014-07-25 11:13:53 -0300
committerTomás Touceda <chiiph@leap.se>2014-07-25 11:39:59 -0300
commit19b74b597bd4d33bb3ea7f95fd4fffcadf372ccd (patch)
tree976f72552c4add19359adf62594e19e5d281c67c /src/leap/bitmask/gui
parentc0a8c436dc1e71cce4ff72506b53ad55cac55f47 (diff)
Add Linux autostart. Closes #4989.
Conflicts: src/leap/bitmask/gui/mainwindow.py
Diffstat (limited to 'src/leap/bitmask/gui')
-rw-r--r--src/leap/bitmask/gui/mainwindow.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index 1bd39267..943e92ea 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -50,7 +50,7 @@ from leap.bitmask.services.mail import conductor as mail_conductor
from leap.bitmask.services import EIP_SERVICE, MX_SERVICE
-from leap.bitmask.util import make_address
+from leap.bitmask.util import autostart, make_address
from leap.bitmask.util.keyring_helpers import has_keyring
from leap.bitmask.logs.leap_log_handler import LeapLogHandler
@@ -103,6 +103,7 @@ class MainWindow(QtGui.QMainWindow):
:type start_hidden: bool
"""
QtGui.QMainWindow.__init__(self)
+ autostart.set_autostart(True)
# register leap events ########################################
register(signal=proto.UPDATER_NEW_UPDATES,
@@ -1740,6 +1741,12 @@ class MainWindow(QtGui.QMainWindow):
"""
# TODO separate the shutting down of services from the
# UI stuff.
+ if self._quitting:
+ return
+
+ autostart.set_autostart(False)
+
+ self._quitting = True
# first thing to do quitting, hide the mainwindow and show tooltip.
self.hide()