diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-08-01 23:40:55 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-02-22 15:31:23 -0500 |
commit | a13a8da8ac977b247b7c8d8b4f2cfcddfc8996e7 (patch) | |
tree | 1634663d824b2249a83d01881924fb3ff5bca2cd /gtk2_ardour/monitor_section.cc | |
parent | d0fc12bd22107bf6f14a2c249ed340d40e596f58 (diff) |
switch all action registration/binding code over to new API.
This removes the ability to change bindings via menus.
Still to come: saving modified bindings, and reworking the key editor
Diffstat (limited to 'gtk2_ardour/monitor_section.cc')
-rw-r--r-- | gtk2_ardour/monitor_section.cc | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/gtk2_ardour/monitor_section.cc b/gtk2_ardour/monitor_section.cc index 275a60f8f3..49a5c754df 100644 --- a/gtk2_ardour/monitor_section.cc +++ b/gtk2_ardour/monitor_section.cc @@ -851,68 +851,67 @@ MonitorSection::register_actions () string action_name; string action_descr; Glib::RefPtr<Action> act; + + monitor_actions = myactions.create_action_group (X_("Monitor")); + myactions.install_action_group (monitor_actions); - monitor_actions = ActionGroup::create (X_("Monitor")); - ActionManager::add_action_group (monitor_actions); - - ActionManager::register_toggle_action (monitor_actions, "monitor-mono", "", _("Switch monitor to mono"), + myactions.register_toggle_action (monitor_actions, "monitor-mono", _("Switch monitor to mono"), sigc::mem_fun (*this, &MonitorSection::mono)); - ActionManager::register_toggle_action (monitor_actions, "monitor-cut-all", "", _("Cut monitor"), + myactions.register_toggle_action (monitor_actions, "monitor-cut-all", _("Cut monitor"), sigc::mem_fun (*this, &MonitorSection::cut_all)); - ActionManager::register_toggle_action (monitor_actions, "monitor-dim-all", "", _("Dim monitor"), + myactions.register_toggle_action (monitor_actions, "monitor-dim-all", _("Dim monitor"), sigc::mem_fun (*this, &MonitorSection::dim_all)); - act = ActionManager::register_toggle_action (monitor_actions, "toggle-exclusive-solo", "", _("Toggle exclusive solo mode"), + act = myactions.register_toggle_action (monitor_actions, "toggle-exclusive-solo", _("Toggle exclusive solo mode"), sigc::mem_fun (*this, &MonitorSection::toggle_exclusive_solo)); Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act); tact->set_active (Config->get_exclusive_solo()); - act = ActionManager::register_toggle_action (monitor_actions, "toggle-mute-overrides-solo", "", _("Toggle mute overrides solo mode"), + act = myactions.register_toggle_action (monitor_actions, "toggle-mute-overrides-solo", _("Toggle mute overrides solo mode"), sigc::mem_fun (*this, &MonitorSection::toggle_mute_overrides_solo)); tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act); tact->set_active (Config->get_solo_mute_override()); - for (uint32_t chn = 0; chn < 16; ++chn) { action_name = string_compose (X_("monitor-cut-%1"), chn); action_descr = string_compose (_("Cut monitor channel %1"), chn); - ActionManager::register_toggle_action (monitor_actions, action_name.c_str(), "", action_descr.c_str(), + myactions.register_toggle_action (monitor_actions, action_name.c_str(), action_descr.c_str(), sigc::bind (sigc::mem_fun (*this, &MonitorSection::cut_channel), chn)); action_name = string_compose (X_("monitor-dim-%1"), chn); action_descr = string_compose (_("Dim monitor channel %1"), chn); - ActionManager::register_toggle_action (monitor_actions, action_name.c_str(), "", action_descr.c_str(), + myactions.register_toggle_action (monitor_actions, action_name.c_str(), action_descr.c_str(), sigc::bind (sigc::mem_fun (*this, &MonitorSection::dim_channel), chn)); action_name = string_compose (X_("monitor-solo-%1"), chn); action_descr = string_compose (_("Solo monitor channel %1"), chn); - ActionManager::register_toggle_action (monitor_actions, action_name.c_str(), "", action_descr.c_str(), + myactions.register_toggle_action (monitor_actions, action_name.c_str(), action_descr.c_str(), sigc::bind (sigc::mem_fun (*this, &MonitorSection::solo_channel), chn)); action_name = string_compose (X_("monitor-invert-%1"), chn); action_descr = string_compose (_("Invert monitor channel %1"), chn); - ActionManager::register_toggle_action (monitor_actions, action_name.c_str(), "", action_descr.c_str(), + myactions.register_toggle_action (monitor_actions, action_name.c_str(), action_descr.c_str(), sigc::bind (sigc::mem_fun (*this, &MonitorSection::invert_channel), chn)); } - Glib::RefPtr<ActionGroup> solo_actions = ActionGroup::create (X_("Solo")); + Glib::RefPtr<ActionGroup> solo_actions = myactions.create_action_group (X_("Solo")); RadioAction::Group solo_group; - ActionManager::register_radio_action (solo_actions, solo_group, "solo-use-in-place", "", _("In-place solo"), + myactions.register_radio_action (solo_actions, solo_group, "solo-use-in-place", _("In-place solo"), sigc::mem_fun (*this, &MonitorSection::solo_use_in_place)); - ActionManager::register_radio_action (solo_actions, solo_group, "solo-use-afl", "", _("After Fade Listen (AFL) solo"), + myactions.register_radio_action (solo_actions, solo_group, "solo-use-afl", _("After Fade Listen (AFL) solo"), sigc::mem_fun (*this, &MonitorSection::solo_use_afl)); - ActionManager::register_radio_action (solo_actions, solo_group, "solo-use-pfl", "", _("Pre Fade Listen (PFL) solo"), + myactions.register_radio_action (solo_actions, solo_group, "solo-use-pfl", _("Pre Fade Listen (PFL) solo"), sigc::mem_fun (*this, &MonitorSection::solo_use_pfl)); - ActionManager::add_action_group (solo_actions); + myactions.install_action_group (solo_actions); } void |