diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-12-06 17:25:47 +0000 |
---|---|---|
committer | Tarmac <> | 2013-12-06 17:25:47 +0000 |
commit | a99685027a4eb04112ca1c27e0c9423d0f9a4518 (patch) | |
tree | b423affe5582c1643acb000bd30e027ab2166f18 /src/bluetooth.vala | |
parent | a26756e48e4e8d3caf0b8b20bb246c4107ca9cb0 (diff) | |
parent | f1ebedfa17339bc9903a347900cf2753535a5e86 (diff) | |
download | ayatana-indicator-bluetooth-a99685027a4eb04112ca1c27e0c9423d0f9a4518.tar.gz ayatana-indicator-bluetooth-a99685027a4eb04112ca1c27e0c9423d0f9a4518.tar.bz2 ayatana-indicator-bluetooth-a99685027a4eb04112ca1c27e0c9423d0f9a4518.zip |
Gets us a little closer to the spec in two ways:
1. Indicator Visibility
On the desktop, the indicator's header icon is visible whenever a default adapter is available (whether the adapter is powered or not) and the user's preference settings call for a visible Bluetooth indicator.
On the phone, the indicator's header icon is visible whenever a default adapter is available *and* the adapter is powered.
2. Header Icon
If Bluetooth is off, the header icon now uses the "bluetooth-disabled" icon.
If Bluetooth is on, it now uses the "bluetooth-active" icon.
If Bluetooth is on and has a connected device, it now uses the "bluetooth-paired" icon. Fixes: https://bugs.launchpad.net/bugs/1126108.
Approved by PS Jenkins bot, Lars Uebernickel.
Diffstat (limited to 'src/bluetooth.vala')
-rw-r--r-- | src/bluetooth.vala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bluetooth.vala b/src/bluetooth.vala index b268701..c711e19 100644 --- a/src/bluetooth.vala +++ b/src/bluetooth.vala @@ -32,6 +32,9 @@ public interface Bluetooth: Object eg by a laptop's network killswitch */ public abstract bool enabled { get; protected set; } + /* True if we have a connected device. */ + public abstract bool connected { get; protected set; } + /* Try to enable/disable bluetooth. This can fail if it's overridden by the system, eg by a laptop's network killswitch */ public abstract void try_set_enabled (bool b); |