From b7325ef4527b90ed007a3f3ba7c61ff680076957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Mon, 11 Mar 2013 17:36:28 -0300 Subject: Provide more meaningful messages in the provider select page --- src/leap/gui/ui/wizard.ui | 47 +++++++++++++++++++++++++++-------------------- src/leap/gui/wizard.py | 15 +++++++++++++++ 2 files changed, 42 insertions(+), 20 deletions(-) (limited to 'src/leap') diff --git a/src/leap/gui/ui/wizard.ui b/src/leap/gui/ui/wizard.ui index a7198c5f..160d628d 100644 --- a/src/leap/gui/ui/wizard.ui +++ b/src/leap/gui/ui/wizard.ui @@ -122,6 +122,29 @@ + + + + + + + Check + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + @@ -132,10 +155,7 @@ - - - - + Checking provider @@ -226,26 +246,13 @@ - - + + - Check + - - - - Qt::Vertical - - - - 20 - 40 - - - - diff --git a/src/leap/gui/wizard.py b/src/leap/gui/wizard.py index ef4eafdb..82deab0d 100644 --- a/src/leap/gui/wizard.py +++ b/src/leap/gui/wizard.py @@ -283,6 +283,11 @@ class Wizard(QtGui.QWizard): Sets the status for the name resolution check """ self._complete_task(data, self.ui.lblNameResolution) + status = "" + if not data[self._provider_bootstrapper.PASSED_KEY]: + status = self.tr("Non-existent " + "provider") + self.ui.lblProviderSelectStatus.setText(status) def _https_connection(self, data): """ @@ -292,6 +297,11 @@ class Wizard(QtGui.QWizard): Sets the status for the https connection check """ self._complete_task(data, self.ui.lblHTTPS) + status = "" + if not data[self._provider_bootstrapper.PASSED_KEY]: + status = self.tr("Provider does not " + "support HTTPS") + self.ui.lblProviderSelectStatus.setText(status) def _download_provider_info(self, data): """ @@ -316,6 +326,11 @@ class Wizard(QtGui.QWizard): } self._complete_task(new_data, self.ui.lblProviderInfo) + status = "" + if not data[self._provider_bootstrapper.PASSED_KEY]: + status = self.tr("Not a valid provider" + "") + self.ui.lblProviderSelectStatus.setText(status) self.ui.btnCheck.setEnabled(True) def _download_ca_cert(self, data): -- cgit v1.2.3