From 2edd2fbe65a2012bc4c93705a1dd319c0c1a3dc3 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 23 Sep 2013 10:22:08 -0500 Subject: use the change-state signal to handle bluetooth-enabled change requests. h/t larsu --- src/profile.vala | 6 +++--- 1 file 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)); -- cgit v1.2.3