aboutsummaryrefslogtreecommitdiff
path: root/src/service.vala
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-08-05 17:47:31 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-08-05 17:47:31 -0500
commit77e298f113541feacb27c1deca14ec953b6559b0 (patch)
tree8126f0e41a531fec3f60eaa58e04c5ae0a724b08 /src/service.vala
parentfcf74c76f44201684dedd88e1fce39140c1a6235 (diff)
downloadayatana-indicator-bluetooth-77e298f113541feacb27c1deca14ec953b6559b0.tar.gz
ayatana-indicator-bluetooth-77e298f113541feacb27c1deca14ec953b6559b0.tar.bz2
ayatana-indicator-bluetooth-77e298f113541feacb27c1deca14ec953b6559b0.zip
pass the SimpleActionGroup handle into the profile object so that dynamically-added actions can get added/exported
Diffstat (limited to 'src/service.vala')
-rw-r--r--src/service.vala12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/service.vala b/src/service.vala
index 0cece83..69f57a6 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -16,13 +16,11 @@ public class Service: Object
public Service (Bluetooth bluetooth)
{
- profiles = new HashTable<string,Profile> (str_hash, str_equal);
- profiles.insert ("phone", new Phone (bluetooth));
- profiles.insert ("desktop", new Desktop (bluetooth));
-
actions = new SimpleActionGroup ();
- foreach (Profile profile in profiles.get_values())
- profile.add_actions_to_group (actions);
+
+ profiles = new HashTable<string,Profile> (str_hash, str_equal);
+ profiles.insert ("phone", new Phone (bluetooth, actions));
+ profiles.insert ("desktop", new Desktop (bluetooth, actions));
}
public int run ()
@@ -61,7 +59,7 @@ public class Service: Object
this.profiles.for_each ((name,profile) => {
var path = @"/com/canonical/indicator/bluetooth/$name";
- message (@"exporting menu '$path'");
+ debug (@"exporting menu '$path'");
profile.export_menu (connection, path);
});
}