diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-09-23 10:22:08 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2013-09-23 10:22:08 -0500 |
commit | 2edd2fbe65a2012bc4c93705a1dd319c0c1a3dc3 (patch) | |
tree | 9c7fb76a814380bf7c3caf169245f9b6ac042618 /src | |
parent | d42aa2d2d21216b394f343b69f3425b5b6209160 (diff) | |
download | ayatana-indicator-bluetooth-2edd2fbe65a2012bc4c93705a1dd319c0c1a3dc3.tar.gz ayatana-indicator-bluetooth-2edd2fbe65a2012bc4c93705a1dd319c0c1a3dc3.tar.bz2 ayatana-indicator-bluetooth-2edd2fbe65a2012bc4c93705a1dd319c0c1a3dc3.zip |
use the change-state signal to handle bluetooth-enabled change requests. h/t larsu
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)); |