aboutsummaryrefslogtreecommitdiff
path: root/src/desktop.vala
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-10-15 16:12:42 +0000
committerTarmac <>2013-10-15 16:12:42 +0000
commit08f4099365f311c4f94ce348902382987adc8f56 (patch)
treefe4e36dd816d0a4a1977132b9ac14cb26b3594fc /src/desktop.vala
parent5fb78027ee730e151d8307623ed0ffcfbac024f5 (diff)
parent73cc5b06408e95c0401cb3cd3c2249f9376f2606 (diff)
downloadayatana-indicator-bluetooth-08f4099365f311c4f94ce348902382987adc8f56.tar.gz
ayatana-indicator-bluetooth-08f4099365f311c4f94ce348902382987adc8f56.tar.bz2
ayatana-indicator-bluetooth-08f4099365f311c4f94ce348902382987adc8f56.zip
When the user chooses to toggle bluetooth on or off, if /dev/rfkill isn't available, fall back to toggling org.bluez.Adapter's Powered property. Fixes: https://bugs.launchpad.net/bugs/1230275, https://bugs.launchpad.net/bugs/1236249.
Approved by Ted Gould, PS Jenkins bot.
Diffstat (limited to 'src/desktop.vala')
-rw-r--r--src/desktop.vala8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/desktop.vala b/src/desktop.vala
index 7c99a45..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
@@ -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;
}