diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-08-07 15:46:58 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-08-07 15:46:58 -0300 |
commit | 2d76c3c97d03d937f238f4ccab633f8db6b77ba7 (patch) | |
tree | c1d96026c5349c34dbf12e736a206f833e152391 | |
parent | 77e5ed38b2bc90799d691f159ed815d78c648dec (diff) | |
parent | 7f252785df20f395cb740a8cca79e70943431748 (diff) |
Merge remote-tracking branch 'ivan/bug/3401_login-fail-left-ui-inconsistent' into develop
-rw-r--r-- | changes/bug-3401_login-fail-left-ui-inconsistent | 1 | ||||
-rw-r--r-- | src/leap/gui/login.py | 6 | ||||
-rw-r--r-- | src/leap/gui/mainwindow.py | 3 |
3 files changed, 4 insertions, 6 deletions
diff --git a/changes/bug-3401_login-fail-left-ui-inconsistent b/changes/bug-3401_login-fail-left-ui-inconsistent new file mode 100644 index 00000000..2403fe0e --- /dev/null +++ b/changes/bug-3401_login-fail-left-ui-inconsistent @@ -0,0 +1 @@ + o Properly handle login failures. Closes bug #3401. diff --git a/src/leap/gui/login.py b/src/leap/gui/login.py index 3c994597..de0b2d50 100644 --- a/src/leap/gui/login.py +++ b/src/leap/gui/login.py @@ -197,18 +197,18 @@ class LoginWidget(QtGui.QWidget): """ self.ui.lnUser.setEnabled(enabled) self.ui.lnPassword.setEnabled(enabled) - self.ui.btnLogin.setEnabled(enabled) self.ui.chkRemember.setEnabled(enabled) self.ui.cmbProviders.setEnabled(enabled) - def set_cancel(self, enabled=False): + self._set_cancel(not enabled) + + def _set_cancel(self, enabled=False): """ Enables or disables the cancel action in the "log in" process. :param enabled: wether it should be enabled or not :type enabled: bool """ - self.ui.btnLogin.setEnabled(enabled) text = self.tr("Cancel") login_or_cancel = self.cancel_login diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index a1ba4df4..6b31fb6c 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -804,7 +804,6 @@ class MainWindow(QtGui.QMainWindow): self._login_widget.set_status(self.tr("Logging in..."), error=False) self._login_widget.set_enabled(False) - self._login_widget.set_cancel(True) if self._login_widget.get_remember() and has_keyring(): # in the keyring and in the settings @@ -832,7 +831,6 @@ class MainWindow(QtGui.QMainWindow): Stops the login sequence. """ logger.debug("Cancelling log in.") - self._login_widget.set_cancel(False) if self._download_provider_defer: logger.debug("Cancelling download provider defer.") @@ -1301,7 +1299,6 @@ class MainWindow(QtGui.QMainWindow): """ passed = data[self._provider_bootstrapper.PASSED_KEY] if not passed: - self._login_widget.set_cancel(False) self._login_widget.set_enabled(True) self._login_widget.set_status( self.tr("Unable to connect: Problem with provider")) |