diff options
author | Tomás Touceda <chiiph@leap.se> | 2014-04-23 16:22:01 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2014-04-23 16:22:01 -0300 |
commit | 8b3bd20e60daa76e37548663ec1655df7ccebadd (patch) | |
tree | 15eea52e31e3ac81f783af0d8acce3dec95c04b6 /src/leap/bitmask/gui | |
parent | aba9ce575bebc4bcae72acc3c22ee95b35c5d7c2 (diff) | |
parent | 48406e9fb4a789eb6b4f14b626332e89b53d7312 (diff) |
Merge remote-tracking branch 'refs/remotes/ivan/bug/5540_change-password-does-not-work' into develop
Diffstat (limited to 'src/leap/bitmask/gui')
-rw-r--r-- | src/leap/bitmask/gui/mainwindow.py | 4 | ||||
-rw-r--r-- | src/leap/bitmask/gui/preferenceswindow.py | 14 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index e4443434..3a94a58d 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -585,9 +585,11 @@ class MainWindow(QtGui.QMainWindow): Displays the preferences window. """ + user = self._login_widget.get_user() + prov = self._login_widget.get_selected_provider() preferences = PreferencesWindow( self, self._backend, self._provider_config, self._soledad, - self._login_widget.get_selected_provider()) + user, prov) self.soledad_ready.connect(preferences.set_soledad_ready) preferences.show() diff --git a/src/leap/bitmask/gui/preferenceswindow.py b/src/leap/bitmask/gui/preferenceswindow.py index 014a0a4f..2947c5db 100644 --- a/src/leap/bitmask/gui/preferenceswindow.py +++ b/src/leap/bitmask/gui/preferenceswindow.py @@ -43,7 +43,8 @@ class PreferencesWindow(QtGui.QDialog): """ preferences_saved = QtCore.Signal() - def __init__(self, parent, backend, provider_config, soledad, domain): + def __init__(self, parent, backend, provider_config, + soledad, username, domain): """ :param parent: parent object of the PreferencesWindow. :parent type: QWidget @@ -53,6 +54,8 @@ class PreferencesWindow(QtGui.QDialog): :type provider_config: ProviderConfig :param soledad: Soledad instance :type soledad: Soledad + :param username: the user set in the login widget + :type username: unicode :param domain: the selected domain in the login widget :type domain: unicode """ @@ -63,6 +66,7 @@ class PreferencesWindow(QtGui.QDialog): self._settings = LeapSettings() self._soledad = soledad self._provider_config = provider_config + self._username = username self._domain = domain self._backend_connect() @@ -191,7 +195,7 @@ class PreferencesWindow(QtGui.QDialog): Changes the user's password if the inputboxes are correctly filled. """ - username = self._srp_auth.get_username() + username = self._username current_password = self.ui.leCurrentPassword.text() new_password = self.ui.leNewPassword.text() new_password2 = self.ui.leNewPassword2.text() @@ -416,12 +420,10 @@ class PreferencesWindow(QtGui.QDialog): sig.srp_password_change_ok.connect(self._change_password_ok) - pwd_change_error = partial( - self._change_password_problem, + pwd_change_error = lambda: self._change_password_problem( self.tr("There was a problem changing the password.")) sig.srp_password_change_error.connect(pwd_change_error) - pwd_change_badpw = partial( - self._change_password_problem, + pwd_change_badpw = lambda: self._change_password_problem( self.tr("You did not enter a correct current password.")) sig.srp_password_change_badpw.connect(pwd_change_badpw) |