diff options
Diffstat (limited to 'src/service.vala')
-rw-r--r-- | src/service.vala | 21 |
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"); |