summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui/statemachines.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-05-29 16:23:23 -0300
committerTomás Touceda <chiiph@leap.se>2014-05-29 16:23:23 -0300
commit5eba0d4173ef352ad30d3f04e7d103bce2c202ed (patch)
treebd5ddcec4ed93c79a8b40942151ea672db6fb9f0 /src/leap/bitmask/gui/statemachines.py
parent7b7e1357fc1e9e64e7c2ee08f762389d7128efc3 (diff)
parentefea398e18f806ad5bb7cec4aa0dcef5f94319bc (diff)
Merge remote-tracking branch 'refs/remotes/kali/bug/eip-restarts-refactor' into develop
Diffstat (limited to 'src/leap/bitmask/gui/statemachines.py')
-rw-r--r--src/leap/bitmask/gui/statemachines.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/leap/bitmask/gui/statemachines.py b/src/leap/bitmask/gui/statemachines.py
index 31938a70..f8e5479d 100644
--- a/src/leap/bitmask/gui/statemachines.py
+++ b/src/leap/bitmask/gui/statemachines.py
@@ -504,6 +504,11 @@ class ConnectionMachineBuilder(object):
conn.qtsigs.connection_died_signal,
states[_OFF])
+ # XXX adding this---------------------
+ states[_ON].addTransition(
+ conn.qtsigs.do_disconnect_signal,
+ states[_DIS])
+
# * If we receive the connection_aborted, we transition
# from connecting to the off state
states[_CON].addTransition(
@@ -551,7 +556,8 @@ class ConnectionMachineBuilder(object):
# TODO add tooltip
# OFF State ----------------------
- off = QState()
+ off = SignallingState(
+ None, name=conn.name)
off_label = _tr("Turn {0}").format(
conn.Connected.short_label)
if button:
@@ -587,7 +593,10 @@ class ConnectionMachineBuilder(object):
states[_CON] = connecting
# ON State ------------------------
- on = QState()
+ on = SignallingState(
+ None, name=conn.name)
+ on_label = _tr("Turn {0}").format(
+ conn.Disconnected.short_label)
if button:
on.assignProperty(
button, 'text', on_label)