change action group owner pointer to be the relevant keybindings; reorder setting keybindings value and defining actions
The reorder is required so that the value of "bindings" has been set and is meaningful
This commit is contained in:
parent
e1b7a43139
commit
685c4f8955
|
@ -125,8 +125,8 @@ ARDOUR_UI::close_current_dialog ()
|
|||
void
|
||||
ARDOUR_UI::install_actions ()
|
||||
{
|
||||
Glib::RefPtr<ActionGroup> main_actions = ActionManager::create_action_group (this, X_("Main"));
|
||||
Glib::RefPtr<ActionGroup> main_menu_actions = ActionManager::create_action_group (this, X_("Main_menu"));
|
||||
Glib::RefPtr<ActionGroup> main_actions = ActionManager::create_action_group (global_bindings, X_("Main"));
|
||||
Glib::RefPtr<ActionGroup> main_menu_actions = ActionManager::create_action_group (global_bindings, X_("Main_menu"));
|
||||
Glib::RefPtr<Action> act;
|
||||
|
||||
ActionManager::register_action (main_actions, X_("Escape"), _("Escape (deselect all)"), sigc::mem_fun (*this, &ARDOUR_UI::escape));
|
||||
|
@ -259,7 +259,7 @@ ARDOUR_UI::install_actions ()
|
|||
|
||||
/* these actions are intended to be shared across all windows */
|
||||
|
||||
common_actions = ActionManager::create_action_group (this, X_("Common"));
|
||||
common_actions = ActionManager::create_action_group (global_bindings, X_("Common"));
|
||||
ActionManager::register_action (common_actions, X_("Quit"), _("Quit"), (hide_return (sigc::mem_fun(*this, &ARDOUR_UI::finish))));
|
||||
ActionManager::register_action (common_actions, X_("Hide"), _("Hide"), sigc::mem_fun (*this, &ARDOUR_UI::hide_application));
|
||||
|
||||
|
@ -415,7 +415,7 @@ ARDOUR_UI::install_actions ()
|
|||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::write_sensitive_actions.push_back (act);
|
||||
|
||||
Glib::RefPtr<ActionGroup> transport_actions = ActionManager::create_action_group (this, X_("Transport"));
|
||||
Glib::RefPtr<ActionGroup> transport_actions = ActionManager::create_action_group (global_bindings, X_("Transport"));
|
||||
|
||||
/* do-nothing action for the "transport" menu bar item */
|
||||
|
||||
|
@ -631,7 +631,7 @@ ARDOUR_UI::install_actions ()
|
|||
act = ActionManager::register_action (main_actions, X_("MonitorMenu"), _("Monitor Section"));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
Glib::RefPtr<ActionGroup> monitor_actions = ActionManager::create_action_group (this, X_("Monitor"));
|
||||
Glib::RefPtr<ActionGroup> monitor_actions = ActionManager::create_action_group (global_bindings, X_("Monitor"));
|
||||
|
||||
act = ActionManager::register_toggle_action (monitor_actions, X_("UseMonitorSection"), _("Use Monitor Section"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_use_monitor_section));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
@ -656,12 +656,12 @@ ARDOUR_UI::install_actions ()
|
|||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
}
|
||||
|
||||
Glib::RefPtr<ActionGroup> shuttle_actions = ActionManager::create_action_group (this, "ShuttleActions");
|
||||
Glib::RefPtr<ActionGroup> shuttle_actions = ActionManager::create_action_group (global_bindings, "ShuttleActions");
|
||||
|
||||
shuttle_actions->add (Action::create (X_("SetShuttleUnitsPercentage"), _("Percentage")), hide_return (sigc::bind (sigc::mem_fun (*Config, &RCConfiguration::set_shuttle_units), Percentage)));
|
||||
shuttle_actions->add (Action::create (X_("SetShuttleUnitsSemitones"), _("Semitones")), hide_return (sigc::bind (sigc::mem_fun (*Config, &RCConfiguration::set_shuttle_units), Semitones)));
|
||||
|
||||
Glib::RefPtr<ActionGroup> option_actions = ActionManager::create_action_group (this, "Options");
|
||||
Glib::RefPtr<ActionGroup> option_actions = ActionManager::create_action_group (global_bindings, "Options");
|
||||
|
||||
act = ActionManager::register_toggle_action (option_actions, X_("SendMTC"), _("Send MTC"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_send_mtc));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
@ -674,7 +674,7 @@ ARDOUR_UI::install_actions ()
|
|||
|
||||
/* MIDI */
|
||||
|
||||
Glib::RefPtr<ActionGroup> midi_actions = ActionManager::create_action_group (this, X_("MIDI"));
|
||||
Glib::RefPtr<ActionGroup> midi_actions = ActionManager::create_action_group (global_bindings, X_("MIDI"));
|
||||
act = ActionManager::register_action (midi_actions, X_("panic"), _("Panic (Send MIDI all-notes-off)"), sigc::mem_fun(*this, &ARDOUR_UI::midi_panic));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
|
|
|
@ -774,8 +774,8 @@ Editor::Editor ()
|
|||
|
||||
/* register actions now so that set_state() can find them and set toggles/checks etc */
|
||||
|
||||
register_actions ();
|
||||
load_bindings ();
|
||||
register_actions ();
|
||||
|
||||
setup_toolbar ();
|
||||
|
||||
|
|
|
@ -108,8 +108,8 @@ Editor::register_actions ()
|
|||
{
|
||||
RefPtr<Action> act;
|
||||
|
||||
editor_actions = ActionManager::create_action_group (this, X_("Editor"));
|
||||
editor_menu_actions = ActionManager::create_action_group (this, X_("EditorMenu"));
|
||||
editor_actions = ActionManager::create_action_group (bindings, X_("Editor"));
|
||||
editor_menu_actions = ActionManager::create_action_group (bindings, X_("EditorMenu"));
|
||||
|
||||
/* non-operative menu items for menu bar */
|
||||
|
||||
|
@ -458,7 +458,7 @@ Editor::register_actions ()
|
|||
|
||||
toggle_reg_sens (editor_actions, "sound-midi-notes", _("Sound Selected MIDI Notes"), sigc::mem_fun (*this, &Editor::toggle_sound_midi_notes));
|
||||
|
||||
Glib::RefPtr<ActionGroup> zoom_actions = ActionManager::create_action_group (this, X_("Zoom"));
|
||||
Glib::RefPtr<ActionGroup> zoom_actions = ActionManager::create_action_group (bindings, X_("Zoom"));
|
||||
RadioAction::Group zoom_group;
|
||||
|
||||
radio_reg_sens (zoom_actions, zoom_group, "zoom-focus-left", _("Zoom Focus Left"), sigc::bind (sigc::mem_fun(*this, &Editor::zoom_focus_chosen), Editing::ZoomFocusLeft));
|
||||
|
@ -478,7 +478,7 @@ Editor::register_actions ()
|
|||
act->set_sensitive (false);
|
||||
}
|
||||
|
||||
Glib::RefPtr<ActionGroup> mouse_mode_actions = ActionManager::create_action_group (this, X_("MouseMode"));
|
||||
Glib::RefPtr<ActionGroup> mouse_mode_actions = ActionManager::create_action_group (bindings, X_("MouseMode"));
|
||||
RadioAction::Group mouse_mode_group;
|
||||
|
||||
act = ActionManager::register_toggle_action (mouse_mode_actions, "set-mouse-mode-object-range", _("Smart Object Mode"), sigc::mem_fun (*this, &Editor::mouse_mode_object_range_toggled));
|
||||
|
@ -555,7 +555,7 @@ Editor::register_actions ()
|
|||
ActionManager::register_action (editor_actions, X_("next-grid-choice"), _("Next Quantize Grid Choice"), sigc::mem_fun (*this, &Editor::next_grid_choice));
|
||||
ActionManager::register_action (editor_actions, X_("prev-grid-choice"), _("Previous Quantize Grid Choice"), sigc::mem_fun (*this, &Editor::prev_grid_choice));
|
||||
|
||||
Glib::RefPtr<ActionGroup> snap_actions = ActionManager::create_action_group (this, X_("Snap"));
|
||||
Glib::RefPtr<ActionGroup> snap_actions = ActionManager::create_action_group (bindings, X_("Snap"));
|
||||
RadioAction::Group grid_choice_group;
|
||||
|
||||
ActionManager::register_radio_action (snap_actions, grid_choice_group, X_("grid-type-thirtyseconds"), grid_type_strings[(int)GridTypeBeatDiv32].c_str(), (sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_chosen), Editing::GridTypeBeatDiv32)));
|
||||
|
@ -587,7 +587,7 @@ Editor::register_actions ()
|
|||
|
||||
/* RULERS */
|
||||
|
||||
Glib::RefPtr<ActionGroup> ruler_actions = ActionManager::create_action_group (this, X_("Rulers"));
|
||||
Glib::RefPtr<ActionGroup> ruler_actions = ActionManager::create_action_group (bindings, X_("Rulers"));
|
||||
ruler_tempo_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-tempo-ruler"), _("Tempo"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_time_tempo)));
|
||||
ruler_meter_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-meter-ruler"), _("Meter"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_time_meter)));
|
||||
ruler_range_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-range-ruler"), _("Ranges"), sigc::bind (sigc::mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_time_range_marker)));
|
||||
|
@ -662,7 +662,7 @@ Editor::register_actions ()
|
|||
|
||||
/* REGION LIST */
|
||||
|
||||
Glib::RefPtr<ActionGroup> rl_actions = ActionManager::create_action_group (this, X_("RegionList"));
|
||||
Glib::RefPtr<ActionGroup> rl_actions = ActionManager::create_action_group (bindings, X_("RegionList"));
|
||||
RadioAction::Group sort_type_group;
|
||||
RadioAction::Group sort_order_group;
|
||||
|
||||
|
@ -1504,7 +1504,7 @@ Editor::reset_canvas_action_sensitivity (bool onoff)
|
|||
void
|
||||
Editor::register_region_actions ()
|
||||
{
|
||||
_region_actions = ActionManager::create_action_group (this, X_("Region"));
|
||||
_region_actions = ActionManager::create_action_group (bindings, X_("Region"));
|
||||
|
||||
/* PART 1: actions that operate on the selection, and for which the edit point type and location is irrelevant */
|
||||
|
||||
|
|
|
@ -114,8 +114,8 @@ Mixer_UI::Mixer_UI ()
|
|||
, _strip_selection_change_without_scroll (false)
|
||||
, _selection (*this, *this)
|
||||
{
|
||||
register_actions ();
|
||||
load_bindings ();
|
||||
register_actions ();
|
||||
_content.set_data ("ardour-bindings", bindings);
|
||||
|
||||
PresentationInfo::Change.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::presentation_info_changed, this, _1), gui_context());
|
||||
|
@ -3203,7 +3203,7 @@ Mixer_UI::showing_spill_for (boost::shared_ptr<Stripable> s) const
|
|||
void
|
||||
Mixer_UI::register_actions ()
|
||||
{
|
||||
Glib::RefPtr<ActionGroup> group = ActionManager::create_action_group (this, X_("Mixer"));
|
||||
Glib::RefPtr<ActionGroup> group = ActionManager::create_action_group (bindings, X_("Mixer"));
|
||||
|
||||
ActionManager::register_action (group, "solo", _("Toggle Solo on Mixer-Selected Tracks/Busses"), sigc::mem_fun (*this, &Mixer_UI::solo_action));
|
||||
ActionManager::register_action (group, "mute", _("Toggle Mute on Mixer-Selected Tracks/Busses"), sigc::mem_fun (*this, &Mixer_UI::mute_action));
|
||||
|
|
|
@ -925,7 +925,7 @@ MonitorSection::register_actions ()
|
|||
string action_descr;
|
||||
Glib::RefPtr<Action> act;
|
||||
|
||||
monitor_actions = ActionManager::create_action_group (this, X_("Monitor"));
|
||||
monitor_actions = ActionManager::create_action_group (bindings, X_("Monitor"));
|
||||
|
||||
act = ActionManager::register_toggle_action (monitor_actions, "toggle-exclusive-solo", _("Toggle exclusive solo mode"),
|
||||
sigc::bind (sigc::ptr_fun (MonitorSection::action_proxy0), ToggleExclusiveSolo));
|
||||
|
@ -963,7 +963,7 @@ MonitorSection::register_actions ()
|
|||
|
||||
}
|
||||
|
||||
solo_actions = ActionManager::create_action_group (this, X_("Solo"));
|
||||
solo_actions = ActionManager::create_action_group (bindings, X_("Solo"));
|
||||
RadioAction::Group solo_group;
|
||||
|
||||
ActionManager::register_radio_action (solo_actions, solo_group, "solo-use-in-place", _("In-place solo"),
|
||||
|
|
|
@ -3765,6 +3765,8 @@ ProcessorBox::register_actions ()
|
|||
need to be considered ownable by all ProcessorBox objects
|
||||
*/
|
||||
|
||||
load_bindings ();
|
||||
|
||||
processor_box_actions = ActionManager::create_action_group (bindings, X_("ProcessorMenu"));
|
||||
|
||||
Glib::RefPtr<Action> act;
|
||||
|
@ -3847,7 +3849,6 @@ ProcessorBox::register_actions ()
|
|||
processor_box_actions, X_("edit-generic"), _("Edit with generic controls..."),
|
||||
sigc::ptr_fun (ProcessorBox::rb_edit_generic));
|
||||
|
||||
load_bindings ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -88,9 +88,10 @@ StepEntry::StepEntry (StepEditor& seditor)
|
|||
, piano (0)
|
||||
, se (&seditor)
|
||||
{
|
||||
register_actions ();
|
||||
load_bindings ();
|
||||
|
||||
register_actions ();
|
||||
|
||||
#if 0
|
||||
/* set channel selector to first selected channel. if none
|
||||
are selected, it will remain at the value set in its
|
||||
|
@ -588,7 +589,7 @@ StepEntry::register_actions ()
|
|||
{
|
||||
/* add named actions for the step editor */
|
||||
|
||||
Glib::RefPtr<ActionGroup> group = ActionManager::create_action_group (this, X_("StepEditing"));
|
||||
Glib::RefPtr<ActionGroup> group = ActionManager::create_action_group (bindings, X_("StepEditing"));
|
||||
|
||||
ActionManager::register_action (group, "insert-a", _("Insert Note A"), sigc::mem_fun (*this, &StepEntry::insert_a));
|
||||
ActionManager::register_action (group, "insert-asharp", _("Insert Note A-sharp"), sigc::mem_fun (*this, &StepEntry::insert_asharp));
|
||||
|
|
|
@ -66,7 +66,7 @@ Manager::register_window (ProxyBase* info)
|
|||
if (!info->menu_name().empty()) {
|
||||
|
||||
if (!window_actions) {
|
||||
window_actions = ActionManager::create_action_group (this, X_("Window"));
|
||||
window_actions = ActionManager::create_action_group (Gtkmm2ext::UI::instance()->global_bindings, X_("Window"));
|
||||
}
|
||||
|
||||
ActionManager::register_toggle_action (window_actions,
|
||||
|
|
Loading…
Reference in New Issue
Block a user