diff options
author | kali <kali@leap.se> | 2013-06-11 01:15:00 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2013-06-11 01:15:00 +0900 |
commit | 0823d50a902609517ca4b79528b95903f22125b0 (patch) | |
tree | 9c35b8a4c7c8a0278be1319048ac1b4507c7c3c9 /src/leap/gui/mainwindow.py | |
parent | 3d91da9b320d2dd267b0c1799c25a3e140077666 (diff) | |
parent | 40c1190ad556aee33d1b90a9c234b36ad0759861 (diff) |
Merge remote-tracking branch 'chiiph/feature/granular_login' into develop
Diffstat (limited to 'src/leap/gui/mainwindow.py')
-rw-r--r-- | src/leap/gui/mainwindow.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index f9e088a7..c892cadd 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -259,6 +259,8 @@ class MainWindow(QtGui.QMainWindow): self._soledad = None self._keymanager = None + self._login_defer = None + self._smtp_config = SMTPConfig() if self._first_run(): @@ -733,10 +735,7 @@ class MainWindow(QtGui.QMainWindow): self._srp_auth.logout_finished.connect( self._done_logging_out) - auth_partial = partial(self._srp_auth.authenticate, - username, - password) - threads.deferToThread(auth_partial) + self._login_defer = self._srp_auth.authenticate(username,password) else: self._set_status(data[self._provider_bootstrapper.ERROR_KEY]) self._login_set_enabled(True) @@ -756,6 +755,7 @@ class MainWindow(QtGui.QMainWindow): # "Succeeded" message and then we switch to the EIP status # panel QtCore.QTimer.singleShot(1000, self._switch_to_status) + self._login_defer = None else: self._login_set_enabled(True) @@ -1172,6 +1172,9 @@ class MainWindow(QtGui.QMainWindow): self.close() + if self._login_defer: + self._login_defer.cancel() + if self._quit_callback: self._quit_callback() logger.debug('Bye.') |