From 0932c83d16f55832d52e06b48f40d3acd3a83692 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 10 Oct 2013 14:58:46 -0500 Subject: add an action whose state shows whether or not bluetooth is supported by the hardware, used by ubuntu-system-settings --- src/profile.vala | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/profile.vala') 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", -- cgit v1.2.3