From 75c9b86e605742f2850d8b50b2419d75129e7949 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Fri, 28 Feb 2014 14:47:44 -0300 Subject: Do version checks in the wizard too. When the user choose to use an existing provider we download the provider.json again so the version checks are executed. [Closes #5048] --- src/leap/bitmask/gui/ui/wizard.ui | 73 ++++++++++++++++++++++++--------------- src/leap/bitmask/gui/wizard.py | 11 +++--- 2 files changed, 50 insertions(+), 34 deletions(-) (limited to 'src') diff --git a/src/leap/bitmask/gui/ui/wizard.ui b/src/leap/bitmask/gui/ui/wizard.ui index d9b8499e..6c592522 100644 --- a/src/leap/bitmask/gui/ui/wizard.ui +++ b/src/leap/bitmask/gui/ui/wizard.ui @@ -269,20 +269,7 @@ Configure or select a provider - - - - - - - https:// - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - + Configure new provider: @@ -292,14 +279,27 @@ - - + + + + false + + + + + - Check + https:// + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + + + + Use existing one: @@ -309,7 +309,7 @@ - + https:// @@ -319,12 +319,29 @@ - - - - false - - + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Check + + + + @@ -859,8 +876,8 @@ 174 - 454 - 254 + 450 + 266 @@ -884,7 +901,7 @@ rbExistingProvider toggled(bool) btnCheck - setDisabled(bool) + setEnabled(bool) 169 diff --git a/src/leap/bitmask/gui/wizard.py b/src/leap/bitmask/gui/wizard.py index e1bed6b8..024b23bc 100644 --- a/src/leap/bitmask/gui/wizard.py +++ b/src/leap/bitmask/gui/wizard.py @@ -223,7 +223,7 @@ class Wizard(QtGui.QWizard): depending on the lnProvider content. """ enabled = len(self.ui.lnProvider.text()) != 0 - enabled = enabled and self.ui.rbNewProvider.isChecked() + enabled = enabled or self.ui.rbExistingProvider.isChecked() self.ui.btnCheck.setEnabled(enabled) if reset: @@ -367,8 +367,10 @@ class Wizard(QtGui.QWizard): Starts the checks for a given provider """ - if len(self.ui.lnProvider.text()) == 0: - return + if self.ui.rbNewProvider.isChecked(): + self._domain = self.ui.lnProvider.text() + else: + self._domain = self.ui.cbProviders.currentText() self._provider_checks_ok = False @@ -380,7 +382,6 @@ class Wizard(QtGui.QWizard): self.ui.btnCheck.setEnabled(False) self.ui.lnProvider.setEnabled(False) self.button(QtGui.QWizard.BackButton).clearFocus() - self._domain = self.ui.lnProvider.text() self.ui.lblNameResolution.setPixmap(self.QUESTION_ICON) self._provider_select_defer = self._backend.\ @@ -401,8 +402,6 @@ class Wizard(QtGui.QWizard): if skip: self._reset_provider_check() - self.page(self.SELECT_PROVIDER_PAGE).set_completed(skip) - self.button(QtGui.QWizard.NextButton).setEnabled(skip) self._use_existing_provider = skip def _complete_task(self, data, label, complete=False, complete_page=-1): -- cgit v1.2.3