aboutsummaryrefslogtreecommitdiff
path: root/src/phone.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/phone.vala')
-rw-r--r--src/phone.vala19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/phone.vala b/src/phone.vala
index 34c10ab..4eaff4d 100644
--- a/src/phone.vala
+++ b/src/phone.vala
@@ -19,21 +19,22 @@
class Phone: Profile
{
- private Action[] actions;
+ Bluetooth bluetooth;
+ SimpleActionGroup action_group;
- public override void add_actions_to_group (SimpleActionGroup group)
- {
- for (var i=0; i<actions.length; i++)
- group.insert (actions[i]);
- }
-
- public Phone (Bluetooth bluetooth)
+ public Phone (Bluetooth bluetooth, SimpleActionGroup action_group)
{
base ("phone");
- actions = {};
+ this.bluetooth = bluetooth;
+ this.action_group = action_group;
+
+ // build the static actions
+ Action[] actions = {};
actions += new SimpleAction.stateful ("root-phone", null, action_state_for_root());
actions += create_settings_action ();
+ foreach (var a in actions)
+ action_group.insert (a);
var section = new Menu ();
section.append (_("Sound settingsā€¦"), "indicator.phone-settings");