diff options
author | Tomás Touceda <chiiph@leap.se> | 2014-02-20 17:46:35 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2014-02-20 17:46:35 -0300 |
commit | 94d3d80b12daf64c5e6a625b6cb7c1bfdd72c216 (patch) | |
tree | 98fe3b546f54ac942a06fea835eb7696d55ee13d /src/leap/bitmask/gui/mainwindow.py | |
parent | 3102cea29c518b1c6cd8d639a22d92e5ca772027 (diff) | |
parent | 2d45a0e1cb0791c7e94b5d2a33c498954055a38e (diff) |
Merge remote-tracking branch 'refs/remotes/ivan/bug/5131_mail-starts-after-logout' into develop
Diffstat (limited to 'src/leap/bitmask/gui/mainwindow.py')
-rw-r--r-- | src/leap/bitmask/gui/mainwindow.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index 6512ffce..b14ca19e 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -1112,7 +1112,6 @@ class MainWindow(QtGui.QMainWindow): self._srp_auth.logout_finished.connect( self._done_logging_out) - # TODO Add errback! self._login_defer = self._srp_auth.authenticate(username, password) self._login_defer.addErrback(self._login_errback) else: @@ -1143,6 +1142,13 @@ class MainWindow(QtGui.QMainWindow): self._mail_conductor.userid = full_user_id self._login_defer = None self._start_eip_bootstrap() + + # if soledad/mail is enabled: + if MX_SERVICE in self._enabled_services: + btn_enabled = self._login_widget.set_logout_btn_enabled + btn_enabled(False) + self.soledad_ready.connect(lambda: btn_enabled(True)) + self.soledad_failed.connect(lambda: btn_enabled(True)) else: self._login_widget.set_enabled(True) @@ -1804,6 +1810,9 @@ class MainWindow(QtGui.QMainWindow): """ self._soledad_bootstrapper.cancel_bootstrap() setProxiedObject(self._soledad, None) + if self._soledad_defer is not None: + logger.debug("Cancelling soledad defer.") + self._soledad_defer.cancel() # reset soledad status flag self._already_started_soledad = False |