summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-03-11 17:36:28 -0300
committerTomás Touceda <chiiph@leap.se>2013-03-11 17:36:28 -0300
commitb7325ef4527b90ed007a3f3ba7c61ff680076957 (patch)
treec93560126a1522ab95a4a62ca6fc6f0c3fda3bf9
parent1371b450a3e4cd8bc1d8b50133eb4b7a8f1d9aad (diff)
Provide more meaningful messages in the provider select page
-rw-r--r--src/leap/gui/ui/wizard.ui47
-rw-r--r--src/leap/gui/wizard.py15
2 files changed, 42 insertions, 20 deletions
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 @@
</property>
</spacer>
</item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="lnProvider"/>
+ </item>
+ <item row="1" column="2">
+ <widget class="QPushButton" name="btnCheck">
+ <property name="text">
+ <string>Check</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
@@ -132,10 +155,7 @@
</property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="lnProvider"/>
- </item>
- <item row="3" column="0" colspan="3">
+ <item row="4" column="0" colspan="3">
<widget class="QGroupBox" name="grpCheckProvider">
<property name="title">
<string>Checking provider</string>
@@ -226,26 +246,13 @@
</layout>
</widget>
</item>
- <item row="1" column="2">
- <widget class="QPushButton" name="btnCheck">
+ <item row="2" column="1" colspan="2">
+ <widget class="QLabel" name="lblProviderSelectStatus">
<property name="text">
- <string>Check</string>
+ <string/>
</property>
</widget>
</item>
- <item row="2" column="1">
- <spacer name="verticalSpacer_2">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</widget>
<widget class="QWizardPage" name="provider_info_page">
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("<font color='red'><b>Non-existent "
+ "provider</b></font>")
+ 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("<font color='red'><b>Provider does not "
+ "support HTTPS</b></font>")
+ 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("<font color='red'><b>Not a valid provider"
+ "</b></font>")
+ self.ui.lblProviderSelectStatus.setText(status)
self.ui.btnCheck.setEnabled(True)
def _download_ca_cert(self, data):