diff options
author | Kali Kaneko <kali@leap.se> | 2014-06-10 09:29:16 -0500 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2014-06-10 09:29:16 -0500 |
commit | 049f8bce340f10e4d61e393a53ba72436b9c3e1c (patch) | |
tree | 10f63eac59cf7621de71777ff4644901b020cf77 /src/leap/bitmask/gui/statemachines.py | |
parent | a1b8dec4352caec64f250ffb9738cd605ccab0ad (diff) | |
parent | c621fa7322b4f8151eb37b27f8aeae563cf6bd63 (diff) |
Merge tag '0.5.2' into deb-0.5.2
Tag leap.bitmask version 0.5.2
Conflicts:
docs/man/bitmask-root.1.rst
docs/man/bitmask.1.rst
Diffstat (limited to 'src/leap/bitmask/gui/statemachines.py')
-rw-r--r-- | src/leap/bitmask/gui/statemachines.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/leap/bitmask/gui/statemachines.py b/src/leap/bitmask/gui/statemachines.py index 31938a70..00a1387e 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: @@ -559,11 +565,15 @@ class ConnectionMachineBuilder(object): button, 'text', off_label) off.assignProperty( button, 'enabled', True) + off.assignProperty( + button, 'visible', True) if action: off.assignProperty( action, 'text', off_label) off.assignProperty( action, 'enabled', True) + off.assignProperty( + action, 'visible', True) off.setObjectName(_OFF) states[_OFF] = off @@ -587,7 +597,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) |