summaryrefslogtreecommitdiff
path: root/src/leap/bitmask
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask')
-rw-r--r--src/leap/bitmask/gui/eip_preferenceswindow.py36
-rw-r--r--src/leap/bitmask/gui/ui/eippreferences.ui99
2 files changed, 9 insertions, 126 deletions
diff --git a/src/leap/bitmask/gui/eip_preferenceswindow.py b/src/leap/bitmask/gui/eip_preferenceswindow.py
index 9f8c4ff4..e0c5d51f 100644
--- a/src/leap/bitmask/gui/eip_preferenceswindow.py
+++ b/src/leap/bitmask/gui/eip_preferenceswindow.py
@@ -50,7 +50,6 @@ class EIPPreferencesWindow(QtGui.QDialog):
self.ui = Ui_EIPPreferences()
self.ui.setupUi(self)
self.ui.lblProvidersGatewayStatus.setVisible(False)
- self.ui.lblAutoStartEIPStatus.setVisible(False)
# Connections
self.ui.cbProvidersGateway.currentIndexChanged[unicode].connect(
@@ -59,40 +58,8 @@ class EIPPreferencesWindow(QtGui.QDialog):
self.ui.cbGateways.currentIndexChanged[unicode].connect(
lambda x: self.ui.lblProvidersGatewayStatus.setVisible(False))
- self.ui.cbProvidersEIP.currentIndexChanged[unicode].connect(
- lambda x: self.ui.lblAutoStartEIPStatus.setVisible(False))
-
- self.ui.cbAutoStartEIP.toggled.connect(
- lambda x: self.ui.lblAutoStartEIPStatus.setVisible(False))
-
- self.ui.pbSaveAutoStartEIP.clicked.connect(self._save_auto_start_eip)
-
self._add_configured_providers()
- # Load auto start EIP settings
- self.ui.cbAutoStartEIP.setChecked(self._settings.get_autostart_eip())
- default_provider = self._settings.get_defaultprovider()
- idx = self.ui.cbProvidersEIP.findText(default_provider)
- self.ui.cbProvidersEIP.setCurrentIndex(idx)
-
- def _save_auto_start_eip(self):
- """
- SLOT
- TRIGGER:
- self.ui.cbAutoStartEIP.toggled
-
- Saves the automatic start of EIP user preference.
- """
- default_provider = self.ui.cbProvidersEIP.currentText()
- enabled = self.ui.cbAutoStartEIP.isChecked()
-
- self._settings.set_autostart_eip(enabled)
- self._settings.set_defaultprovider(default_provider)
-
- self.ui.lblAutoStartEIPStatus.show()
- logger.debug('Auto start EIP saved: {0} {1}.'.format(
- default_provider, enabled))
-
def _set_providers_gateway_status(self, status, success=False,
error=False):
"""
@@ -120,16 +87,13 @@ class EIPPreferencesWindow(QtGui.QDialog):
Add the client's configured providers to the providers combo boxes.
"""
self.ui.cbProvidersGateway.clear()
- self.ui.cbProvidersEIP.clear()
providers = self._settings.get_configured_providers()
if not providers:
- self.ui.gbAutomaticEIP.setEnabled(False)
self.ui.gbGatewaySelector.setEnabled(False)
return
for provider in providers:
self.ui.cbProvidersGateway.addItem(provider)
- self.ui.cbProvidersEIP.addItem(provider)
def _save_selected_gateway(self, provider):
"""
diff --git a/src/leap/bitmask/gui/ui/eippreferences.ui b/src/leap/bitmask/gui/ui/eippreferences.ui
index cc77c82e..a3050683 100644
--- a/src/leap/bitmask/gui/ui/eippreferences.ui
+++ b/src/leap/bitmask/gui/ui/eippreferences.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>435</width>
- <height>273</height>
+ <height>144</height>
</rect>
</property>
<property name="windowTitle">
@@ -18,7 +18,7 @@
<normaloff>:/images/mask-icon.png</normaloff>:/images/mask-icon.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout_2">
- <item row="1" column="0">
+ <item row="0" column="0">
<widget class="QGroupBox" name="gbGatewaySelector">
<property name="enabled">
<bool>true</bool>
@@ -33,7 +33,7 @@
<item row="0" column="0">
<widget class="QLabel" name="lblSelectProvider">
<property name="text">
- <string>&amp;Select provider:</string>
+ <string>Select &amp;provider:</string>
</property>
<property name="buddy">
<cstring>cbProvidersGateway</cstring>
@@ -52,7 +52,7 @@
<item row="7" column="2">
<widget class="QPushButton" name="pbSaveGateway">
<property name="text">
- <string>Save this provider settings</string>
+ <string>&amp;Save this provider settings</string>
</property>
</widget>
</item>
@@ -69,7 +69,10 @@
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
- <string>Select gateway:</string>
+ <string>Select &amp;gateway:</string>
+ </property>
+ <property name="buddy">
+ <cstring>cbGateways</cstring>
</property>
</widget>
</item>
@@ -85,76 +88,9 @@
</layout>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QGroupBox" name="gbAutomaticEIP">
- <property name="title">
- <string>Automatic Encrypted Internet start</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_3">
- <item row="3" column="0">
- <widget class="QLabel" name="lblAutoStartEIPStatus">
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Plain</enum>
- </property>
- <property name="text">
- <string>&lt;font color='green'&gt;&lt;b&gt;Automatic EIP start saved!&lt;/b&gt;&lt;/font&gt;</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QPushButton" name="pbSaveAutoStartEIP">
- <property name="text">
- <string>Save auto start setting</string>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QCheckBox" name="cbAutoStartEIP">
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string>Enable Automatic start:</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QComboBox" name="cbProvidersEIP">
- <item>
- <property name="text">
- <string>&lt;Select provider&gt;</string>
- </property>
- </item>
- </widget>
- </item>
- </layout>
- <zorder>cbAutoStartEIP</zorder>
- <zorder>lblAutoStartEIPStatus</zorder>
- <zorder>pbSaveAutoStartEIP</zorder>
- <zorder>cbProvidersEIP</zorder>
- </widget>
- </item>
</layout>
</widget>
<tabstops>
- <tabstop>cbAutoStartEIP</tabstop>
- <tabstop>cbProvidersEIP</tabstop>
- <tabstop>pbSaveAutoStartEIP</tabstop>
<tabstop>cbProvidersGateway</tabstop>
<tabstop>cbGateways</tabstop>
<tabstop>pbSaveGateway</tabstop>
@@ -162,22 +98,5 @@
<resources>
<include location="../../../../../data/resources/mainwindow.qrc"/>
</resources>
- <connections>
- <connection>
- <sender>cbAutoStartEIP</sender>
- <signal>toggled(bool)</signal>
- <receiver>cbProvidersEIP</receiver>
- <slot>setEnabled(bool)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>180</x>
- <y>53</y>
- </hint>
- <hint type="destinationlabel">
- <x>238</x>
- <y>53</y>
- </hint>
- </hints>
- </connection>
- </connections>
+ <connections/>
</ui>