summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-06-13 16:16:47 -0300
committerTomás Touceda <chiiph@leap.se>2013-06-13 16:16:47 -0300
commitc752f90f2e242b96a6a63aa56466d22d8db8ceb6 (patch)
tree3554395a1ca7aec8031193d71cfc4db19ac0b4ce /src
parentb72db47a15b07843a82c8d5dbe762d5278d9af07 (diff)
Always use best provider config
Also, set the expected user@provider after stopping EIP, in case it was automatically started with another provider
Diffstat (limited to 'src')
-rw-r--r--src/leap/gui/mainwindow.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py
index 67fe34e3..aa9154e2 100644
--- a/src/leap/gui/mainwindow.py
+++ b/src/leap/gui/mainwindow.py
@@ -805,7 +805,7 @@ class MainWindow(QtGui.QMainWindow):
if not self._already_started_eip:
self._status_panel.set_provider(
"%s@%s" % (self._login_widget.get_user(),
- self._provider_config.get_domain()))
+ self._get_best_provider_config().get_domain()))
self.ui.stackedWidget.setCurrentIndex(self.EIP_STATUS_INDEX)
@@ -952,7 +952,7 @@ class MainWindow(QtGui.QMainWindow):
self._settings.set_defaultprovider(
provider_config.get_domain())
- provider = self._provider_config.get_domain()
+ provider = provider_config.get_domain()
if self._logged_user is not None:
provider = "%s@%s" % (self._logged_user, provider)
@@ -1005,6 +1005,11 @@ class MainWindow(QtGui.QMainWindow):
self._start_eip)
self._already_started_eip = False
+ if self._logged_user:
+ self._status_panel.set_provider(
+ "%s@%s" % (self._logged_user,
+ self._get_best_provider_config().get_domain()))
+
def _get_best_provider_config(self):
"""
Returns the best ProviderConfig to use at a moment. We may