summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui/preferences_account_page.py
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-09-08 02:01:14 -0700
committerelijah <elijah@riseup.net>2014-09-19 14:23:14 -0700
commit6166ffedcae0763f3c00076c79e74847f5c80823 (patch)
treecb649abc87ed6030c20ccdb9ac95dce51b2f1ec5 /src/leap/bitmask/gui/preferences_account_page.py
parent4e7c4b48b4255ceac06900fa9e65824c52e15ba7 (diff)
single pref win: moved password change UI to a separate window, opened from account page in preferences.
Diffstat (limited to 'src/leap/bitmask/gui/preferences_account_page.py')
-rw-r--r--src/leap/bitmask/gui/preferences_account_page.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/leap/bitmask/gui/preferences_account_page.py b/src/leap/bitmask/gui/preferences_account_page.py
index bb90aab5..895d84b5 100644
--- a/src/leap/bitmask/gui/preferences_account_page.py
+++ b/src/leap/bitmask/gui/preferences_account_page.py
@@ -22,6 +22,7 @@ from functools import partial
from PySide import QtCore, QtGui
from ui_preferences_account_page import Ui_PreferencesAccountPage
+from passwordwindow import PasswordWindow
from leap.bitmask.services import get_service_display_name
from leap.bitmask.config.leapsettings import LeapSettings
@@ -43,9 +44,17 @@ class PreferencesAccountPage(QtGui.QWidget):
self.ui.change_password_label.setVisible(False)
self.ui.provider_services_label.setVisible(False)
+ self.ui.change_password_button.clicked.connect(
+ self._show_change_password)
app.signaler.prov_get_supported_services.connect(self._load_services)
app.backend.provider_get_supported_services(domain=account.domain)
+ if account.username is None:
+ self.ui.change_password_label.setText(
+ self.tr('You must be logged in to change your password.'))
+ self.ui.change_password_label.setVisible(True)
+ self.ui.change_password_button.setEnabled(False)
+
@QtCore.Slot(str, int)
def _service_selection_changed(self, service, state):
"""
@@ -112,3 +121,9 @@ class PreferencesAccountPage(QtGui.QWidget):
except ValueError:
logger.error("Something went wrong while trying to "
"load service %s" % (service,))
+
+ @QtCore.Slot()
+ def _show_change_password(self):
+ change_password_window = PasswordWindow(self, self.account, self.app)
+ change_password_window.show()
+