aboutsummaryrefslogtreecommitdiff
path: root/src/service.vala
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-08-01 18:21:05 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-08-01 18:21:05 -0500
commitcf894302767d5ec483b5f8002bb796a284895bbf (patch)
treedb2db117dd355db27e72efa9087b8e18a43d38ae /src/service.vala
parent3cc732f558737acd0004efb013993515845e67d7 (diff)
downloadayatana-indicator-bluetooth-cf894302767d5ec483b5f8002bb796a284895bbf.tar.gz
ayatana-indicator-bluetooth-cf894302767d5ec483b5f8002bb796a284895bbf.tar.bz2
ayatana-indicator-bluetooth-cf894302767d5ec483b5f8002bb796a284895bbf.zip
add a bluetooth backend to track bluetooth being enabled, being hard/soft blocked, and its devices.
Diffstat (limited to 'src/service.vala')
-rw-r--r--src/service.vala21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/service.vala b/src/service.vala
index b6ae0f3..0f3d779 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -28,24 +28,27 @@ public class BluetoothIndicator
private List<BluetoothMenuItem> device_items;
private Dbusmenu.Menuitem menu;
- public BluetoothIndicator () throws Error
+ public BluetoothIndicator (Bluetooth bluetooth)
{
- var phone = new PhoneMenu ();
- var desktop = new DesktopMenu ();
+ var phone = new PhoneMenu (bluetooth);
+ var desktop = new DesktopMenu (bluetooth);
- this.menus = new HashTable<string, BluetoothMenu> (str_hash, str_equal);
- this.menus.insert ("phone", phone);
- this.menus.insert ("desktop", desktop);
+ this.menus = new HashTable<string, BluetoothMenu> (str_hash, str_equal);
+ this.menus.insert ("phone", phone);
+ this.menus.insert ("desktop", desktop);
- this.actions = new SimpleActionGroup ();
- phone.add_actions_to_group (this.actions);
- desktop.add_actions_to_group (this.actions);
+ this.actions = new SimpleActionGroup ();
+ phone.add_actions_to_group (this.actions);
+ desktop.add_actions_to_group (this.actions);
}
private void init_for_bus (DBusConnection bus)
{
this.bus = bus;
+ ///
+ ///
+
indicator_service = new Indicator.Service ("com.canonical.indicator.bluetooth.old");
menu_server = new Dbusmenu.Server ("/com/canonical/indicator/bluetooth/menu");