From f7ca11b202e442e759cca86a70d9c6d027e82e76 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 11 Oct 2013 08:38:51 -0500 Subject: if /dev/rfkill doesn't exist or isn't writable, then try to handle bluetooth toggles simply by toggling bluez Adapters' Powered property --- src/desktop.vala | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/desktop.vala') diff --git a/src/desktop.vala b/src/desktop.vala index 7c99a45..a30935a 100644 --- a/src/desktop.vala +++ b/src/desktop.vala @@ -82,7 +82,7 @@ class Desktop: Profile void update_visibility () { - visible = bluetooth.powered && !bluetooth.blocked && settings.get_boolean("visible"); + visible = bluetooth.enabled && settings.get_boolean("visible"); } /// @@ -229,10 +229,6 @@ class Desktop: Profile bluetooth.notify["discoverable"].connect (() => action.set_state (bluetooth.discoverable)); - action.set_enabled (bluetooth.powered); - bluetooth.notify["powered"].connect (() - => action.set_enabled (bluetooth.powered)); - return action; } -- cgit v1.2.3 From e15cd36f96ae3108faf50da2c613d4a3e3d44359 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 14 Oct 2013 18:25:57 -0500 Subject: when listening to notify events from bluetooth to update desktop indicator visibility, add a specifier for which event to monitor --- src/desktop.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/desktop.vala') diff --git a/src/desktop.vala b/src/desktop.vala index a30935a..4e36273 100644 --- a/src/desktop.vala +++ b/src/desktop.vala @@ -66,7 +66,7 @@ class Desktop: Profile // know when to show the indicator & when to hide it settings.changed["visible"].connect (()=> update_visibility()); - bluetooth.notify.connect (() => update_visibility()); + bluetooth.notify["enabled"].connect (() => update_visibility()); update_visibility (); // when devices change, rebuild our device section -- cgit v1.2.3