diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-08-05 17:47:31 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2013-08-05 17:47:31 -0500 |
commit | 77e298f113541feacb27c1deca14ec953b6559b0 (patch) | |
tree | 8126f0e41a531fec3f60eaa58e04c5ae0a724b08 /src/service.vala | |
parent | fcf74c76f44201684dedd88e1fce39140c1a6235 (diff) | |
download | ayatana-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.vala | 12 |
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); }); } |