diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-09-23 16:51:16 +0000 |
---|---|---|
committer | Tarmac <> | 2013-09-23 16:51:16 +0000 |
commit | e440832b9f241fb01fe2a65e5357176416691374 (patch) | |
tree | 9c7fb76a814380bf7c3caf169245f9b6ac042618 /src | |
parent | d42aa2d2d21216b394f343b69f3425b5b6209160 (diff) | |
parent | 2edd2fbe65a2012bc4c93705a1dd319c0c1a3dc3 (diff) | |
download | ayatana-indicator-bluetooth-e440832b9f241fb01fe2a65e5357176416691374.tar.gz ayatana-indicator-bluetooth-e440832b9f241fb01fe2a65e5357176416691374.tar.bz2 ayatana-indicator-bluetooth-e440832b9f241fb01fe2a65e5357176416691374.zip |
Handle the change-state event rather than notify["state"] so that there won't be any inconsistency between the action's state and the killswitch -- ie, the state won't change unless the killswitch toggle succeeds.
Approved by PS Jenkins bot, Lars Uebernickel.
Diffstat (limited to 'src')
-rw-r--r-- | src/profile.vala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/profile.vala b/src/profile.vala index c1e3f6f..cfe85e3 100644 --- a/src/profile.vala +++ b/src/profile.vala @@ -114,10 +114,10 @@ class Profile: Object !bluetooth.blocked); action.activate.connect (() - => action.set_state (!action.get_state().get_boolean())); + => action.change_state (!action.get_state().get_boolean())); - action.notify["state"].connect (() - => bluetooth.try_set_blocked (!action.get_state().get_boolean())); + action.change_state.connect ((action, requestedValue) + => bluetooth.try_set_blocked (!requestedValue.get_boolean())); bluetooth.notify["blocked"].connect (() => action.set_state (!bluetooth.blocked)); |