From 0a295be5fb396e67d7ce6800a647adbc69acee8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Mon, 11 Mar 2013 18:29:49 -0300 Subject: Set register page as commit page Also, document reset_provider_checks method, and add a reset for provider setup --- src/leap/gui/wizard.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') diff --git a/src/leap/gui/wizard.py b/src/leap/gui/wizard.py index 86e0dcfd..90ff7f1b 100644 --- a/src/leap/gui/wizard.py +++ b/src/leap/gui/wizard.py @@ -116,6 +116,8 @@ class Wizard(QtGui.QWizard): self.ui.lblUser.setValidator( QtGui.QRegExpValidator(usernameRe, self)) + self.page(self.REGISTER_USER_PAGE).setCommitPage(True) + self._username = None self._password = None @@ -233,6 +235,10 @@ class Wizard(QtGui.QWizard): self.ui.lblRegisterStatus.setText(status) def _reset_provider_check(self): + """ + Resets the UI for checking a provider. Also resets the domain + in this object. + """ self.ui.lblNameResolution.setPixmap(self.QUESTION_ICON) self.ui.lblHTTPS.setPixmap(self.QUESTION_ICON) self.ui.lblProviderInfo.setPixmap(self.QUESTION_ICON) @@ -240,6 +246,14 @@ class Wizard(QtGui.QWizard): self.button(QtGui.QWizard.NextButton).setEnabled(False) self.page(self.SELECT_PROVIDER_PAGE).set_completed(False) + def _reset_provider_setup(self): + """ + Resets the UI for setting up a provider. + """ + self.ui.lblDownloadCaCert.setPixmap(self.QUESTION_ICON) + self.ui.lblCheckCaFpr.setPixmap(self.QUESTION_ICON) + self.ui.lblCheckApiCert.setPixmap(self.QUESTION_ICON) + def _check_provider(self): """ SLOT @@ -421,6 +435,7 @@ class Wizard(QtGui.QWizard): self._enable_check("") if pageId == self.SETUP_PROVIDER_PAGE: + self._reset_provider_setup() self.page(pageId).setSubTitle(self.tr("Gathering configuration " "options for %s") % (self._provider_config -- cgit v1.2.3