From a6e96bc487ffb9c4b4d34957ca4b2b48a88b0ccb Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Fri, 11 Apr 2014 13:50:15 -0300 Subject: Enable provider widget depending on radio button. Disable providers combo box during check and enable combo or line edit depending on radio button. [Closes #5495] --- changes/bug-5495_wizard-provider-edit-disable | 1 + src/leap/bitmask/gui/wizard.py | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 changes/bug-5495_wizard-provider-edit-disable diff --git a/changes/bug-5495_wizard-provider-edit-disable b/changes/bug-5495_wizard-provider-edit-disable new file mode 100644 index 00000000..879f95e0 --- /dev/null +++ b/changes/bug-5495_wizard-provider-edit-disable @@ -0,0 +1 @@ +- Disable providers combo box during check and enable combo or line edit depending on radio button. Closes #5495. diff --git a/src/leap/bitmask/gui/wizard.py b/src/leap/bitmask/gui/wizard.py index e2c1a16e..ebcee400 100644 --- a/src/leap/bitmask/gui/wizard.py +++ b/src/leap/bitmask/gui/wizard.py @@ -390,7 +390,13 @@ class Wizard(QtGui.QWizard): self.ui.grpCheckProvider.setVisible(True) self.ui.btnCheck.setEnabled(False) - self.ui.lnProvider.setEnabled(False) + + # Disable provider widget + if self.ui.rbNewProvider.isChecked(): + self.ui.lnProvider.setEnabled(False) + else: + self.ui.cbProviders.setEnabled(False) + self.button(QtGui.QWizard.BackButton).clearFocus() self.ui.lblNameResolution.setPixmap(self.QUESTION_ICON) @@ -506,7 +512,12 @@ class Wizard(QtGui.QWizard): "") self.ui.lblProviderSelectStatus.setText(status) self.ui.btnCheck.setEnabled(True) - self.ui.lnProvider.setEnabled(True) + + # Enable provider widget + if self.ui.rbNewProvider.isChecked(): + self.ui.lnProvider.setEnabled(True) + else: + self.ui.cbProviders.setEnabled(True) def _download_ca_cert(self, data): """ -- cgit v1.2.3