summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-10-03 14:00:14 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-10-03 14:00:14 -0300
commit6f932294e7bf58e66ca117fe46ebe346e10aef0f (patch)
tree564a24fdb548e00c038a0cd4d618068b4b178257 /src/leap
parent91fb5281f941af7aa36997a0dec4300d65363fb5 (diff)
Reorder providers combo, disable if no providers.
- Move radio buttons to get more space for the labels. - If there are no configured providers then disable the combo.
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/bitmask/gui/ui/wizard.ui53
-rw-r--r--src/leap/bitmask/gui/wizard.py6
2 files changed, 34 insertions, 25 deletions
diff --git a/src/leap/bitmask/gui/ui/wizard.ui b/src/leap/bitmask/gui/ui/wizard.ui
index b796b795..0f6eef6e 100644
--- a/src/leap/bitmask/gui/ui/wizard.ui
+++ b/src/leap/bitmask/gui/ui/wizard.ui
@@ -269,7 +269,24 @@
<string>Configure or select a provider</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
- <item row="0" column="1">
+ <item row="0" column="0">
+ <widget class="QRadioButton" name="rbNewProvider">
+ <property name="text">
+ <string>Configure new provider:</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QRadioButton" name="rbExistingProvider">
+ <property name="text">
+ <string>Use existing one:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>https://</string>
@@ -279,44 +296,30 @@
</property>
</widget>
</item>
- <item row="0" column="2">
+ <item row="1" column="1">
<widget class="QLineEdit" name="lnProvider"/>
</item>
<item row="1" column="2">
- <widget class="QComboBox" name="cbProviders">
- <property name="enabled">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
<widget class="QPushButton" name="btnCheck">
<property name="text">
<string>Check</string>
</property>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QRadioButton" name="rbNewProvider">
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_8">
<property name="text">
- <string>Configure new provider</string>
- </property>
- <property name="checked">
- <bool>true</bool>
+ <string>https://</string>
</property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QRadioButton" name="rbExistingProvider">
- <property name="text">
- <string>Use existing one</string>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QLabel" name="label_8">
- <property name="text">
- <string>https://</string>
+ <item row="3" column="1">
+ <widget class="QComboBox" name="cbProviders">
+ <property name="enabled">
+ <bool>false</bool>
</property>
</widget>
</item>
diff --git a/src/leap/bitmask/gui/wizard.py b/src/leap/bitmask/gui/wizard.py
index 219270c7..e3f5904e 100644
--- a/src/leap/bitmask/gui/wizard.py
+++ b/src/leap/bitmask/gui/wizard.py
@@ -155,6 +155,12 @@ class Wizard(QtGui.QWizard):
"""
ls = LeapSettings()
providers = ls.get_configured_providers()
+ if not providers:
+ self.ui.rbExistingProvider.setEnabled(False)
+ self.ui.label_8.setEnabled(False) # 'https://' label
+ self.ui.cbProviders.setEnabled(False)
+ return
+
pinned = []
user_added = []