diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2016-02-14 14:52:35 -0600 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2016-02-14 14:52:35 -0600 |
commit | 4fc9eb374f299b473f9ebf27dbb80a4b7f8a726e (patch) | |
tree | cd78eac71094f837e2ad79d0ff85646339a6502a /src | |
parent | 55bd7905ec797fa7477969a3405f7f5b7c43cfd3 (diff) | |
download | ayatana-indicator-bluetooth-4fc9eb374f299b473f9ebf27dbb80a4b7f8a726e.tar.gz ayatana-indicator-bluetooth-4fc9eb374f299b473f9ebf27dbb80a4b7f8a726e.tar.bz2 ayatana-indicator-bluetooth-4fc9eb374f299b473f9ebf27dbb80a4b7f8a726e.zip |
in bluez.vala, update our state properties when org.bluez vanishes from the bus
Diffstat (limited to 'src')
-rw-r--r-- | src/bluez.vala | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/bluez.vala b/src/bluez.vala index b3d96dd..3e9df06 100644 --- a/src/bluez.vala +++ b/src/bluez.vala @@ -76,9 +76,9 @@ public class Bluez: Bluetooth, Object Bus.unwatch_name(name_watch_id); } - private void on_bluez_appeared (GLib.DBusConnection connection, string name, string name_owner) + private void on_bluez_appeared (DBusConnection connection, string name, string name_owner) { - debug(@"name $name owned by $name_owner, setting up bluez proxies"); + debug(@"$name owned by $name_owner, setting up bluez proxies"); bus = connection; @@ -86,9 +86,16 @@ public class Bluez: Bluetooth, Object reset_manager(); } - private void on_bluez_vanished (GLib.DBusConnection connection, string name) + private void on_bluez_vanished (DBusConnection connection, string name) { + debug(@"$name vanished from the bus"); + reset_bluez_lookup_vars(); + + devices_changed (); + update_combined_adapter_state (); + update_connected (); + update_enabled (); } private void reset_bluez_lookup_vars () |