summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui/mainwindow.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-06-04 16:14:42 -0300
committerTomás Touceda <chiiph@leap.se>2014-06-04 16:14:42 -0300
commit82e1c4b1e3e5dd49b6e868732451a744ba37ba59 (patch)
treee16fadc6286fedf1e2ddcd0d4f173a37e7226011 /src/leap/bitmask/gui/mainwindow.py
parent5210383ece1dcc4e2150dd1c08cc0ba4106f3b1f (diff)
parentaba3ea21d83e6e073baf01643b68832530a6f4d0 (diff)
Merge remote-tracking branch 'refs/remotes/kali/feature/add-fw-down-button' into develop
Diffstat (limited to 'src/leap/bitmask/gui/mainwindow.py')
-rw-r--r--src/leap/bitmask/gui/mainwindow.py25
1 files changed, 4 insertions, 21 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index e7406106..a3b81fde 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -158,8 +158,6 @@ class MainWindow(QtGui.QMainWindow):
self._eip_conductor.connect_signals()
self._eip_conductor.qtsigs.connected_signal.connect(
self._on_eip_connection_connected)
- self._eip_conductor.qtsigs.disconnected_signal.connect(
- self._on_eip_connection_disconnected)
self._eip_conductor.qtsigs.connected_signal.connect(
self._maybe_run_soledad_setup_checks)
@@ -1448,6 +1446,7 @@ class MainWindow(QtGui.QMainWindow):
Enables the EIP start action in the systray menu.
"""
self._action_eip_startstop.setEnabled(True)
+ self._eip_status.enable_eip_start()
@QtCore.Slot()
def _on_eip_connection_connected(self):
@@ -1468,25 +1467,6 @@ class MainWindow(QtGui.QMainWindow):
# check for connectivity
self._check_name_resolution(domain)
- @QtCore.Slot()
- def _on_eip_connection_disconnected(self):
- """
- TRIGGERS:
- self._eip_conductor.qtsigs.disconnected_signal
-
- Workaround for updating the eip_status widget with
- the provider when the eip connection disconnects.
- """
- # TODO
- # We should move this to the conductor<->widget interface.
- # To do that, we need to subscribe to logged_user,
- # for example by using the observer pattern or a proxy object.
- user = self._logged_user
- if user:
- domain = self._login_widget.get_selected_provider()
- full_user_id = make_address(user, domain)
- self._eip_status.set_provider(full_user_id)
-
def _check_name_resolution(self, domain):
# FIXME this has to be moved to backend !!!
# Should move to netchecks module.
@@ -1563,7 +1543,10 @@ class MainWindow(QtGui.QMainWindow):
should_start = self._provides_eip_and_enabled()
if should_start and not self._already_started_eip:
+ if self._eip_status.is_cold_start:
+ self._backend.tear_fw_down()
# XXX this should be handled by the state machine.
+ self._enable_eip_start_action()
self._eip_status.set_eip_status(
self.tr("Starting..."))
self._eip_status.eip_button.setEnabled(False)