summaryrefslogtreecommitdiff
path: root/src/leap/bitmask
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-11-26 11:03:44 -0200
committerKali Kaneko <kali@leap.se>2013-11-26 11:03:44 -0200
commitbc03b9571fcedf397daaa1451118f0a9a589d416 (patch)
tree7e244f42844c59dc103018f6b059ae8659a751d3 /src/leap/bitmask
parent2620cd58a11d524735f0f205a1cd39ad28ad8ddb (diff)
parent897017bfdd1ab67e2662fdd6e97b980c1e5d6258 (diff)
Merge remote-tracking branch 'ivan-github/feature/4490_preferences-selects-current-login-widget-provider' into develop
Diffstat (limited to 'src/leap/bitmask')
-rw-r--r--src/leap/bitmask/gui/mainwindow.py6
-rw-r--r--src/leap/bitmask/gui/preferenceswindow.py9
2 files changed, 8 insertions, 7 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index e21d6cd2..25e25e45 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -467,9 +467,9 @@ class MainWindow(QtGui.QMainWindow):
Displays the preferences window.
"""
- preferences_window = PreferencesWindow(self, self._srp_auth,
- self._provider_config,
- self._soledad)
+ preferences_window = PreferencesWindow(
+ self, self._srp_auth, self._provider_config, self._soledad,
+ self._login_widget.get_selected_provider())
self.soledad_ready.connect(preferences_window.set_soledad_ready)
preferences_window.show()
diff --git a/src/leap/bitmask/gui/preferenceswindow.py b/src/leap/bitmask/gui/preferenceswindow.py
index 8e9ef95a..b4bddef2 100644
--- a/src/leap/bitmask/gui/preferenceswindow.py
+++ b/src/leap/bitmask/gui/preferenceswindow.py
@@ -42,7 +42,7 @@ class PreferencesWindow(QtGui.QDialog):
"""
Window that displays the preferences.
"""
- def __init__(self, parent, srp_auth, provider_config, soledad):
+ def __init__(self, parent, srp_auth, provider_config, soledad, domain):
"""
:param parent: parent object of the PreferencesWindow.
:parent type: QWidget
@@ -52,6 +52,8 @@ class PreferencesWindow(QtGui.QDialog):
:type provider_config: ProviderConfig
:param soledad: Soledad instance
:type soledad: Soledad
+ :param domain: the selected domain in the login widget
+ :type domain: unicode
"""
QtGui.QDialog.__init__(self, parent)
self.AUTOMATIC_GATEWAY_LABEL = self.tr("Automatic")
@@ -83,9 +85,6 @@ class PreferencesWindow(QtGui.QDialog):
# check if the user is logged in
if srp_auth is not None and srp_auth.get_token() is not None:
# check if provider has 'mx' ...
- domain = provider_config.get_domain()
- self._select_provider_by_name(domain)
-
if provider_config.provides_mx():
enabled_services = self._settings.get_enabled_services(domain)
mx_name = get_service_display_name(MX_SERVICE)
@@ -111,6 +110,8 @@ class PreferencesWindow(QtGui.QDialog):
"In order to change your password you need to be logged in.")
self._set_password_change_status(msg)
+ self._select_provider_by_name(domain)
+
self.ui.gbPasswordChange.setEnabled(pw_enabled)
def set_soledad_ready(self):