diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-10-10 14:58:46 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2013-10-10 14:58:46 -0500 |
commit | 0932c83d16f55832d52e06b48f40d3acd3a83692 (patch) | |
tree | 66b1fcec7959fce24c4f2fafa935a02f34bac312 /src/profile.vala | |
parent | 5165b13efd79ac2fc5bb6aa902b3ecedf84634f0 (diff) | |
download | ayatana-indicator-bluetooth-0932c83d16f55832d52e06b48f40d3acd3a83692.tar.gz ayatana-indicator-bluetooth-0932c83d16f55832d52e06b48f40d3acd3a83692.tar.bz2 ayatana-indicator-bluetooth-0932c83d16f55832d52e06b48f40d3acd3a83692.zip |
add an action whose state shows whether or not bluetooth is supported by the hardware, used by ubuntu-system-settings
Diffstat (limited to 'src/profile.vala')
-rw-r--r-- | src/profile.vala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/profile.vala b/src/profile.vala index cfe85e3..c32e46b 100644 --- a/src/profile.vala +++ b/src/profile.vala @@ -107,6 +107,18 @@ class Profile: Object /// Actions /// + protected Action create_supported_action (Bluetooth bluetooth) + { + var action = new SimpleAction.stateful ("bluetooth-supported", + null, + bluetooth.supported); + + bluetooth.notify["supported"].connect (() + => action.set_state (bluetooth.supported)); + + return action; + } + protected Action create_enabled_action (Bluetooth bluetooth) { var action = new SimpleAction.stateful ("bluetooth-enabled", |