From 057f42dcc2c23b93b872301d01a944fde5025439 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Mon, 30 Sep 2013 18:28:00 -0300 Subject: Add providers combobox with configured providers. --- src/leap/bitmask/gui/ui/wizard.ui | 171 ++++++++++++++++++++++++++++++++------ src/leap/bitmask/gui/wizard.py | 6 ++ 2 files changed, 151 insertions(+), 26 deletions(-) (limited to 'src/leap/bitmask/gui') diff --git a/src/leap/bitmask/gui/ui/wizard.ui b/src/leap/bitmask/gui/ui/wizard.ui index 420c74ae..b796b795 100644 --- a/src/leap/bitmask/gui/ui/wizard.ui +++ b/src/leap/bitmask/gui/ui/wizard.ui @@ -134,17 +134,7 @@ - - - - - - - Check - - - - + Qt::Vertical @@ -157,17 +147,7 @@ - - - - https:// - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - + Checking for a valid provider @@ -276,13 +256,73 @@ - + + + + + Configure or select a provider + + + + + + https:// + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + false + + + + + + + Check + + + + + + + Configure new provider + + + true + + + + + + + Use existing one + + + + + + + https:// + + + + + + @@ -764,12 +804,91 @@ btnRegister rdoRegister rdoLogin - lnProvider - btnCheck - + + + rbExistingProvider + toggled(bool) + cbProviders + setFocus() + + + 167 + 192 + + + 265 + 191 + + + + + rbNewProvider + toggled(bool) + lnProvider + setFocus() + + + 171 + 164 + + + 246 + 164 + + + + + rbExistingProvider + toggled(bool) + lnProvider + setDisabled(bool) + + + 169 + 196 + + + 327 + 163 + + + + + rbNewProvider + toggled(bool) + cbProviders + setDisabled(bool) + + + 169 + 162 + + + 269 + 193 + + + + + rbExistingProvider + toggled(bool) + btnCheck + setDisabled(bool) + + + 154 + 193 + + + 498 + 170 + + + + diff --git a/src/leap/bitmask/gui/wizard.py b/src/leap/bitmask/gui/wizard.py index 5c00f631..f71ce06b 100644 --- a/src/leap/bitmask/gui/wizard.py +++ b/src/leap/bitmask/gui/wizard.py @@ -26,6 +26,7 @@ from functools import partial from PySide import QtCore, QtGui from twisted.internet import threads +from leap.bitmask.config.leapsettings import LeapSettings from leap.bitmask.config.providerconfig import ProviderConfig from leap.bitmask.crypto.srpregister import SRPRegister from leap.bitmask.provider.providerbootstrapper import ProviderBootstrapper @@ -141,6 +142,11 @@ class Wizard(QtGui.QWizard): self.ui.label_12.setVisible(False) self.ui.lblProviderPolicy.setVisible(False) + # Load configured providers into wizard + ls = LeapSettings() + providers = ls.get_configured_providers() + self.ui.cbProviders.addItems(providers) + def get_domain(self): return self._domain -- cgit v1.2.3