summaryrefslogtreecommitdiff
path: root/src/leap/bitmask
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2014-06-05 15:38:09 -0500
committerKali Kaneko <kali@leap.se>2014-06-05 16:01:08 -0500
commitbc60662ccc740d191cf8a1d368e66459dd1c4ae5 (patch)
tree448b1fdbb85cf62f2974a3c4d2b208012c7f5211 /src/leap/bitmask
parent0b8cd73171eee3bf3f3c7b91faa90104e85e492b (diff)
change elements naming
Diffstat (limited to 'src/leap/bitmask')
-rw-r--r--src/leap/bitmask/gui/eip_status.py21
-rw-r--r--src/leap/bitmask/gui/ui/eip_status.ui2
-rw-r--r--src/leap/bitmask/services/eip/conductor.py5
3 files changed, 15 insertions, 13 deletions
diff --git a/src/leap/bitmask/gui/eip_status.py b/src/leap/bitmask/gui/eip_status.py
index 280ce79e..dcd7ef42 100644
--- a/src/leap/bitmask/gui/eip_status.py
+++ b/src/leap/bitmask/gui/eip_status.py
@@ -249,7 +249,7 @@ class EIPStatusWidget(QtGui.QWidget):
def set_action_eip_startstop(self, action_eip_startstop):
"""
- Sets the action_eip_startstop to use.
+ Set the action_eip_startstop to use.
:param action_eip_startstop: action_eip_status to be used
:type action_eip_startstop: QtGui.QAction
@@ -392,6 +392,9 @@ class EIPStatusWidget(QtGui.QWidget):
"""
Enable firewall-down button.
"""
+ retry_msg = self.tr("Retry")
+ self.ui.btnEipStartStop.setText(retry_msg)
+ self._action_eip_startstop.setText(retry_msg)
self.ui.btnFwDown.show()
def _on_fw_down_button_clicked(self):
@@ -404,6 +407,7 @@ class EIPStatusWidget(QtGui.QWidget):
# XXX do actual check
msg = "Traffic is being routed in the clear."
+ self.ui.btnEipStartStop.setText(self.tr("Turn ON"))
self.set_eip_message(msg)
self.set_eip_status("")
@@ -419,15 +423,13 @@ class EIPStatusWidget(QtGui.QWidget):
self._reset_traffic_rates()
self.ui.eip_bandwidth.hide()
- # XXX FIXME ! ----------------------- this needs to
- # accomodate the messages about firewall status. Right now
- # we're assuming it works correctly, but we should test fw
+ # This is assuming the firewall works correctly, but we should test fw
# status positively.
# Or better call it from the conductor...
clear_traffic = self.tr("Traffic is being routed in the clear.")
unreachable_net = self.tr("Network is unreachable.")
- failed_msg = self.tr("Cannot start Encrypted Internet")
+ failed_msg = self.tr("Error connecting")
if restart:
msg = unreachable_net
@@ -439,14 +441,15 @@ class EIPStatusWidget(QtGui.QWidget):
self.ui.lblEIPStatus.show()
self.show()
- def eip_failed_to_restart(self):
+ def eip_failed_to_connect(self):
"""
- Update EIP messages.
+ Update EIP messages with error during (re)connection.
"""
- msg = self.tr("Could not restart Encrypted Internet")
+ msg = self.tr("Error connecting.")
self.ui.lblEIPMessage.setText(msg)
self.ui.lblEIPStatus.show()
- self.set_eip_status(self.tr("You can launch the service manually."))
+ self.set_eip_status(self.tr("Bitmask is blocking "
+ "unencrypted traffic."))
self.show_fw_down_button()
@QtCore.Slot(dict)
diff --git a/src/leap/bitmask/gui/ui/eip_status.ui b/src/leap/bitmask/gui/ui/eip_status.ui
index 01d6b371..892f0f00 100644
--- a/src/leap/bitmask/gui/ui/eip_status.ui
+++ b/src/leap/bitmask/gui/ui/eip_status.ui
@@ -242,7 +242,7 @@
<item row="0" column="2">
<widget class="QPushButton" name="btnFwDown">
<property name="text">
- <string>Allow unencrypted traffic</string>
+ <string>Turn Off</string>
</property>
</widget>
</item>
diff --git a/src/leap/bitmask/services/eip/conductor.py b/src/leap/bitmask/services/eip/conductor.py
index cde53631..a8821160 100644
--- a/src/leap/bitmask/services/eip/conductor.py
+++ b/src/leap/bitmask/services/eip/conductor.py
@@ -258,7 +258,7 @@ class EIPConductor(object):
"""
logger.debug("TLS Error: eip_stop (failed)")
self.qtsigs.connection_died_signal.emit()
- QtDelayedCall(1000, self._eip_status.eip_failed_to_restart)
+ QtDelayedCall(1000, self._eip_status.eip_failed_to_connect)
@QtCore.Slot(int)
def _eip_finished(self, exitCode):
@@ -311,8 +311,7 @@ class EIPConductor(object):
error=True)
signal = self.qtsigs.connection_died_signal
self._eip_status.show_fw_down_button()
- msg = self._eip_status.tr("Outgoing traffic is blocked")
- self._eip_status.set_eip_message(msg)
+ self._eip_status.eip_failed_to_connect()
if exitCode == 0 and IS_MAC:
# XXX remove this warning after I fix cocoasudo.