diff options
author | Tomás Touceda <chiiph@leap.se> | 2014-05-30 11:44:33 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2014-05-30 12:58:11 -0300 |
commit | 520ffec305f89cd1ee504c24adee9e1bee21c452 (patch) | |
tree | 4487eba36c5d40e5fd88a15d8790892a3bcfe95f /src/leap/bitmask | |
parent | 0b1e346b0c3c5306bed639f955847bb50bdc1650 (diff) |
Update EIP UI if it fails to load the config
Diffstat (limited to 'src/leap/bitmask')
-rw-r--r-- | src/leap/bitmask/gui/eip_status.py | 40 | ||||
-rw-r--r-- | src/leap/bitmask/gui/mainwindow.py | 1 |
2 files changed, 17 insertions, 24 deletions
diff --git a/src/leap/bitmask/gui/eip_status.py b/src/leap/bitmask/gui/eip_status.py index ba041968..e7795083 100644 --- a/src/leap/bitmask/gui/eip_status.py +++ b/src/leap/bitmask/gui/eip_status.py @@ -526,6 +526,14 @@ class EIPStatusWidget(QtGui.QWidget): self.ui.lblEIPMessage.setText( self.tr("Route traffic through: {0}").format(self._provider)) + def aborted(self): + """ + Notify the state machine that EIP was aborted for some reason. + """ + # signal connection_aborted to state machine: + qtsigs = self.eipconnection.qtsigs + qtsigs.connection_aborted_signal.emit() + # # Slots for signals # @@ -544,9 +552,7 @@ class EIPStatusWidget(QtGui.QWidget): self.eip_conductor.eip_name) self.set_eip_status(eip_status_label, error=True) - # signal connection_aborted to state machine: - qtsigs = self.eipconnection.qtsigs - qtsigs.connection_aborted_signal.emit() + self.aborted() def _on_eip_openvpn_already_running(self): self.set_eip_status( @@ -555,9 +561,7 @@ class EIPStatusWidget(QtGui.QWidget): error=True) self.set_eipstatus_off() - # signal connection_aborted to state machine: - qtsigs = self.eipconnection.qtsigs - qtsigs.connection_aborted_signal.emit() + self.aborted() def _on_eip_alien_openvpn_already_running(self): self.set_eip_status( @@ -567,9 +571,7 @@ class EIPStatusWidget(QtGui.QWidget): error=True) self.set_eipstatus_off() - # signal connection_aborted to state machine: - qtsigs = self.eipconnection.qtsigs - qtsigs.connection_aborted_signal.emit() + self.aborted() def _on_eip_openvpn_not_found_error(self): self.set_eip_status( @@ -577,9 +579,7 @@ class EIPStatusWidget(QtGui.QWidget): error=True) self.set_eipstatus_off() - # signal connection_aborted to state machine: - qtsigs = self.eipconnection.qtsigs - qtsigs.connection_aborted_signal.emit() + self.aborted() def _on_eip_vpn_launcher_exception(self): # XXX We should implement again translatable exceptions so @@ -587,9 +587,7 @@ class EIPStatusWidget(QtGui.QWidget): self.set_eip_status("VPN Launcher error.", error=True) self.set_eipstatus_off() - # signal connection_aborted to state machine: - qtsigs = self.eipconnection.qtsigs - qtsigs.connection_aborted_signal.emit() + self.aborted() def _on_eip_no_polkit_agent_error(self): self.set_eip_status( @@ -602,9 +600,7 @@ class EIPStatusWidget(QtGui.QWidget): error=True) self.set_eipstatus_off() - # signal connection_aborted to state machine: - qtsigs = self.eipconnection.qtsigs - qtsigs.connection_aborted_signal.emit() + self.aborted() def _on_eip_no_pkexec_error(self): self.set_eip_status( @@ -612,9 +608,7 @@ class EIPStatusWidget(QtGui.QWidget): error=True) self.set_eipstatus_off() - # signal connection_aborted to state machine: - qtsigs = self.eipconnection.qtsigs - qtsigs.connection_aborted_signal.emit() + self.aborted() def _on_eip_no_tun_kext_error(self): self.set_eip_status( @@ -623,9 +617,7 @@ class EIPStatusWidget(QtGui.QWidget): "system.").format(self.eip_conductor.eip_name)) self.set_eipstatus_off() - # signal connection_aborted to state machine: - qtsigs = self.eipconnection.qtsigs - qtsigs.connection_aborted_signal.emit() + self.aborted() @QtCore.Slot() def _on_eip_network_unreachable(self): diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index a0eb84a2..5420eb4d 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -1624,6 +1624,7 @@ class MainWindow(QtGui.QMainWindow): self.tr("Unable to connect: Problem with provider")) logger.error(data[self._backend.ERROR_KEY]) self._already_started_eip = False + self._eip_status.aborted() # end of EIP methods --------------------------------------------- |