X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Feditor_actions.cc;h=79df54b25fdecbb568ce4551a6b04fb87e9b60ef;hb=129ace60e24aa7b5297563d389edbae1d70a3a80;hp=bc7d5ee7affeb322b85f1722b827ec85223687b1;hpb=8687895abba4209a6de8d8a8fc1bda5996f0d875;p=ardour.git diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index bc7d5ee7af..79df54b25f 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -106,7 +106,7 @@ Editor::register_actions () /* add named actions for the editor */ - ActionManager::register_action (editor_actions, "break-drag", _("Break drag"), sigc::mem_fun (*this, &Editor::break_drag)); + ActionManager::register_action (editor_actions, "escape", _("Break drag or deselect all"), sigc::mem_fun (*this, &Editor::escape)); act = ActionManager::register_toggle_action (editor_actions, "show-editor-mixer", _("Show Editor Mixer"), sigc::mem_fun (*this, &Editor::editor_mixer_button_toggled)); ActionManager::session_sensitive_actions.push_back (act); @@ -200,83 +200,35 @@ Editor::register_actions () act = ActionManager::register_action (editor_actions, "select-all-in-loop-range", _("Select All in Loop Range"), sigc::mem_fun(*this, &Editor::select_all_selectables_using_loop)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "select-next-route", _("Select Next Track/Bus"), sigc::mem_fun(*this, &Editor::select_next_route)); + act = ActionManager::register_action (editor_actions, "select-next-route", _("Select Next Track or Bus"), sigc::mem_fun(*this, &Editor::select_next_route)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "select-prev-route", _("Select Previous Track/Bus"), sigc::mem_fun(*this, &Editor::select_prev_route)); + act = ActionManager::register_action (editor_actions, "select-prev-route", _("Select Previous Track or Bus"), sigc::mem_fun(*this, &Editor::select_prev_route)); ActionManager::session_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "track-record-enable-toggle", _("Toggle Record Enable"), sigc::mem_fun(*this, &Editor::toggle_record_enable)); ActionManager::session_sensitive_actions.push_back (act); + ActionManager::track_selection_sensitive_actions.push_back (act); + for (int i = 1; i <= 12; ++i) { + string const a = string_compose (X_("save-visual-state-%1"), i); + string const n = string_compose (_("Save View %1"), i); + act = ActionManager::register_action (editor_actions, a.c_str(), n.c_str(), sigc::bind (sigc::mem_fun (*this, &Editor::start_visual_state_op), i - 1)); + ActionManager::session_sensitive_actions.push_back (act); + } - act = ActionManager::register_action (editor_actions, "save-visual-state-1", _("Save View 1"), sigc::bind (sigc::mem_fun (*this, &Editor::start_visual_state_op), 0)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-1", _("Goto View 1"), sigc::bind (sigc::mem_fun (*this, &Editor::cancel_visual_state_op), 0)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-2", _("Save View 2"), sigc::bind (sigc::mem_fun (*this, &Editor::start_visual_state_op), 1)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-2", _("Goto View 2"), sigc::bind (sigc::mem_fun (*this, &Editor::cancel_visual_state_op), 1)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-3", _("Save View 3"), sigc::bind (sigc::mem_fun (*this, &Editor::start_visual_state_op), 2)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-3", _("Goto View 3"), sigc::bind (sigc::mem_fun (*this, &Editor::cancel_visual_state_op), 2)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-4", _("Save View 4"), sigc::bind (sigc::mem_fun (*this, &Editor::start_visual_state_op), 3)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-4", _("Goto View 4"), sigc::bind (sigc::mem_fun (*this, &Editor::cancel_visual_state_op), 3)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-5", _("Save View 5"), sigc::bind (sigc::mem_fun (*this, &Editor::start_visual_state_op), 4)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-5", _("Goto View 5"), sigc::bind (sigc::mem_fun (*this, &Editor::cancel_visual_state_op), 4)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-6", _("Save View 6"), sigc::bind (sigc::mem_fun (*this, &Editor::start_visual_state_op), 5)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-6", _("Goto View 6"), sigc::bind (sigc::mem_fun (*this, &Editor::cancel_visual_state_op), 5)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-7", _("Save View 7"), sigc::bind (sigc::mem_fun (*this, &Editor::start_visual_state_op), 6)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-7", _("Goto View 7"), sigc::bind (sigc::mem_fun (*this, &Editor::cancel_visual_state_op), 6)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-8", _("Save View 8"), sigc::bind (sigc::mem_fun (*this, &Editor::start_visual_state_op), 7)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-8", _("Goto View 8"), sigc::bind (sigc::mem_fun (*this, &Editor::cancel_visual_state_op), 7)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-9", _("Save View 9"), sigc::bind (sigc::mem_fun (*this, &Editor::start_visual_state_op), 8)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-9", _("Goto View 9"), sigc::bind (sigc::mem_fun (*this, &Editor::cancel_visual_state_op), 8)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-10", _("Save View 10"), sigc::bind (sigc::mem_fun (*this, &Editor::start_visual_state_op), 9)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-10", _("Goto View 10"), sigc::bind (sigc::mem_fun (*this, &Editor::cancel_visual_state_op), 9)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-11", _("Save View 11"), sigc::bind (sigc::mem_fun (*this, &Editor::start_visual_state_op), 10)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-11", _("Goto View 11"), sigc::bind (sigc::mem_fun (*this, &Editor::cancel_visual_state_op), 10)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "save-visual-state-12", _("Save View 12"), sigc::bind (sigc::mem_fun (*this, &Editor::start_visual_state_op), 11)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-visual-state-12", _("Goto View 12"), sigc::bind (sigc::mem_fun (*this, &Editor::cancel_visual_state_op), 11)); - ActionManager::session_sensitive_actions.push_back (act); - - - act = ActionManager::register_action (editor_actions, "goto-mark-1", _("Locate to Mark 1"), sigc::bind (sigc::mem_fun (*this, &Editor::goto_nth_marker), 0)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-mark-2", _("Locate to Mark 2"), sigc::bind (sigc::mem_fun (*this, &Editor::goto_nth_marker), 1)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-mark-3", _("Locate to Mark 3"), sigc::bind (sigc::mem_fun (*this, &Editor::goto_nth_marker), 2)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-mark-4", _("Locate to Mark 4"), sigc::bind (sigc::mem_fun (*this, &Editor::goto_nth_marker), 3)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-mark-5", _("Locate to Mark 5"), sigc::bind (sigc::mem_fun (*this, &Editor::goto_nth_marker), 4)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-mark-6", _("Locate to Mark 6"), sigc::bind (sigc::mem_fun (*this, &Editor::goto_nth_marker), 5)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-mark-7", _("Locate to Mark 7"), sigc::bind (sigc::mem_fun (*this, &Editor::goto_nth_marker), 6)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-mark-8", _("Locate to Mark 8"), sigc::bind (sigc::mem_fun (*this, &Editor::goto_nth_marker), 7)); - ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "goto-mark-9", _("Locate to Mark 9"), sigc::bind (sigc::mem_fun (*this, &Editor::goto_nth_marker), 8)); - ActionManager::session_sensitive_actions.push_back (act); + for (int i = 1; i <= 12; ++i) { + string const a = string_compose (X_("goto-visual-state-%1"), i); + string const n = string_compose (_("Goto View %1"), i); + act = ActionManager::register_action (editor_actions, a.c_str(), n.c_str(), sigc::bind (sigc::mem_fun (*this, &Editor::cancel_visual_state_op), i - 1)); + ActionManager::session_sensitive_actions.push_back (act); + } + + for (int i = 1; i <= 9; ++i) { + string const a = string_compose (X_("goto-mark-%1"), i); + string const n = string_compose (_("Locate to Mark %1"), i); + act = ActionManager::register_action (editor_actions, a.c_str(), n.c_str(), sigc::bind (sigc::mem_fun (*this, &Editor::goto_nth_marker), i - 1)); + ActionManager::session_sensitive_actions.push_back (act); + } act = ActionManager::register_action (editor_actions, "jump-forward-to-mark", _("Jump Forward to Mark"), sigc::mem_fun(*this, &Editor::jump_forward_to_mark)); ActionManager::session_sensitive_actions.push_back (act); @@ -312,24 +264,30 @@ Editor::register_actions () ActionManager::session_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "zoom-to-region", _("Zoom to Region"), sigc::bind (sigc::mem_fun(*this, &Editor::zoom_to_region), false)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "zoom-to-region-both-axes", _("Zoom to Region (W&H)"), sigc::bind (sigc::mem_fun(*this, &Editor::zoom_to_region), true)); + act = ActionManager::register_action (editor_actions, "zoom-to-region-both-axes", _("Zoom to Region (Width and Height)"), sigc::bind (sigc::mem_fun(*this, &Editor::zoom_to_region), true)); ActionManager::session_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "toggle-zoom", _("Toggle Zoom State"), sigc::mem_fun(*this, &Editor::swap_visual_state)); ActionManager::session_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "move-selected-tracks-up", _("Move Selected Tracks Up"), sigc::bind (sigc::mem_fun(*_routes, &EditorRoutes::move_selected_tracks), true)); ActionManager::session_sensitive_actions.push_back (act); + ActionManager::track_selection_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "move-selected-tracks-down", _("Move Selected Tracks Down"), sigc::bind (sigc::mem_fun(*_routes, &EditorRoutes::move_selected_tracks), false)); ActionManager::session_sensitive_actions.push_back (act); + ActionManager::track_selection_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "scroll-tracks-up", _("Scroll Tracks Up"), sigc::mem_fun(*this, &Editor::scroll_tracks_up)); ActionManager::session_sensitive_actions.push_back (act); + ActionManager::track_selection_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "scroll-tracks-down", _("Scroll Tracks Down"), sigc::mem_fun(*this, &Editor::scroll_tracks_down)); + ActionManager::track_selection_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "step-tracks-up", _("Step Tracks Up"), sigc::mem_fun(*this, &Editor::scroll_tracks_up_line)); + ActionManager::track_selection_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "step-tracks-down", _("Step Tracks Down"), sigc::mem_fun(*this, &Editor::scroll_tracks_down_line)); ActionManager::session_sensitive_actions.push_back (act); + ActionManager::track_selection_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "scroll-backward", _("Scroll Backward"), sigc::bind (sigc::mem_fun(*this, &Editor::scroll_backward), 0.8f)); ActionManager::session_sensitive_actions.push_back (act); @@ -389,6 +347,7 @@ Editor::register_actions () ActionManager::region_selection_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "set-punch-from-edit-range", _("Set Punch from Edit Range"), sigc::mem_fun(*this, &Editor::set_punch_from_edit_range)); ActionManager::session_sensitive_actions.push_back (act); + ActionManager::region_selection_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "set-punch-from-region", _("Set Punch From Region"), sigc::mem_fun(*this, &Editor::set_punch_from_region)); ActionManager::session_sensitive_actions.push_back (act); ActionManager::region_selection_sensitive_actions.push_back (act); @@ -436,7 +395,7 @@ Editor::register_actions () act = ActionManager::register_action (editor_actions, "play-from-edit-point", _("Play From Edit Point"), sigc::mem_fun(*this, &Editor::play_from_edit_point)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "play-from-edit-point-and-return", _("Play from Edit Point & Return"), sigc::mem_fun(*this, &Editor::play_from_edit_point_and_return)); + act = ActionManager::register_action (editor_actions, "play-from-edit-point-and-return", _("Play from Edit Point and Return"), sigc::mem_fun(*this, &Editor::play_from_edit_point_and_return)); ActionManager::session_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "play-edit-range", _("Play Edit Range"), sigc::mem_fun(*this, &Editor::play_edit_range)); @@ -454,7 +413,7 @@ Editor::register_actions () act = ActionManager::register_action (editor_actions, "duplicate-region", _("Duplicate Region"), sigc::bind (sigc::mem_fun(*this, &Editor::duplicate_dialog), false)); ActionManager::session_sensitive_actions.push_back (act); ActionManager::region_selection_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "multi-duplicate-region", _("Multi-Duplicate Region"), sigc::bind (sigc::mem_fun(*this, &Editor::duplicate_dialog), true)); + act = ActionManager::register_action (editor_actions, "multi-duplicate-region", _("Multi-Duplicate Region..."), sigc::bind (sigc::mem_fun(*this, &Editor::duplicate_dialog), true)); ActionManager::session_sensitive_actions.push_back (act); ActionManager::region_selection_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "duplicate-range", _("Duplicate Range"), sigc::bind (sigc::mem_fun(*this, &Editor::duplicate_dialog), false)); @@ -463,13 +422,13 @@ Editor::register_actions () act = ActionManager::register_action (editor_actions, "insert-region", _("Insert Region"), sigc::mem_fun(*this, &Editor::keyboard_insert_region_list_selection)); ActionManager::session_sensitive_actions.push_back (act); ActionManager::region_selection_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "normalize-region", _("Normalize Region"), sigc::mem_fun(*this, &Editor::normalize_region)); + act = ActionManager::register_action (editor_actions, "normalize-region", _("Normalize Region..."), sigc::mem_fun(*this, &Editor::normalize_region)); ActionManager::session_sensitive_actions.push_back (act); ActionManager::region_selection_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "rename-region", _("Rename"), sigc::mem_fun(*this, &Editor::rename_region)); + act = ActionManager::register_action (editor_actions, "rename-region", _("Rename Region..."), sigc::mem_fun(*this, &Editor::rename_region)); ActionManager::session_sensitive_actions.push_back (act); ActionManager::region_selection_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "auto-rename-region", _("Auto-Rename"), sigc::mem_fun(*this, &Editor::rename_region)); + act = ActionManager::register_action (editor_actions, "auto-rename-region", _("Auto-Rename Region"), sigc::mem_fun(*this, &Editor::rename_region)); ActionManager::session_sensitive_actions.push_back (act); ActionManager::region_selection_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "boost-region-gain", _("Boost Region Gain"), sigc::bind (sigc::mem_fun(*this, &Editor::adjust_region_scale_amplitude), true)); @@ -499,7 +458,7 @@ Editor::register_actions () act = ActionManager::register_toggle_action (editor_actions, "lock-region", _("Lock Region"), sigc::mem_fun(*this, &Editor::toggle_region_lock)); ActionManager::session_sensitive_actions.push_back (act); ActionManager::region_selection_sensitive_actions.push_back (act); - act = ActionManager::register_toggle_action (editor_actions, "glue-region", _("Glue Region to Bars & Beats"), sigc::bind (sigc::mem_fun (*this, &Editor::set_region_lock_style), Region::MusicTime)); + act = ActionManager::register_toggle_action (editor_actions, "glue-region", _("Glue Region to Bars and Beats"), sigc::mem_fun (*this, &Editor::toggle_region_lock_style)); ActionManager::session_sensitive_actions.push_back (act); ActionManager::region_selection_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "naturalize-region", _("Move to Original Position"), sigc::mem_fun (*this, &Editor::naturalize)); @@ -508,7 +467,7 @@ Editor::register_actions () act = ActionManager::register_action (editor_actions, "reverse-region", _("Reverse"), sigc::mem_fun (*this, &Editor::reverse_region)); ActionManager::session_sensitive_actions.push_back (act); ActionManager::region_selection_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "monoize-region", _("Make mono regions"), (sigc::mem_fun(*this, &Editor::split_multichannel_region))); + act = ActionManager::register_action (editor_actions, "monoize-region", _("Make Mono Regions"), (sigc::mem_fun(*this, &Editor::split_multichannel_region))); ActionManager::session_sensitive_actions.push_back (act); ActionManager::region_selection_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "region-fill-track", _("Fill Track"), (sigc::mem_fun(*this, &Editor::region_fill_track))); @@ -563,8 +522,9 @@ Editor::register_actions () act = ActionManager::register_action (editor_actions, "split-region-at-transients", _("Split Regions At Percussion Onsets"), sigc::mem_fun(*this, &Editor::split_region_at_transients)); ActionManager::session_sensitive_actions.push_back (act); ActionManager::region_selection_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "toggle-rhythm-ferret", _("Rhythm Ferret"), sigc::mem_fun(*this, &Editor::show_rhythm_ferret)); + act = ActionManager::register_action (editor_actions, "toggle-rhythm-ferret", _("Rhythm Ferret..."), sigc::mem_fun(*this, &Editor::show_rhythm_ferret)); ActionManager::session_sensitive_actions.push_back (act); + ActionManager::region_selection_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "toggle-audio-connection-manager", _("Audio Connection Manager"), sigc::bind (sigc::mem_fun (*this, &Editor::show_global_port_matrix), ARDOUR::DataType::AUDIO)); ActionManager::session_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "toggle-midi-connection-manager", _("MIDI Connection Manager"), sigc::bind (sigc::mem_fun (*this, &Editor::show_global_port_matrix), ARDOUR::DataType::MIDI)); @@ -585,7 +545,7 @@ Editor::register_actions () ActionManager::session_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "finish-range", _("Finish Range"), sigc::bind (sigc::mem_fun(*this, &Editor::keyboard_selection_finish), false)); ActionManager::session_sensitive_actions.push_back (act); - act = ActionManager::register_action (editor_actions, "finish-add-range", _("Finish add Range"), sigc::bind (sigc::mem_fun(*this, &Editor::keyboard_selection_finish), true)); + act = ActionManager::register_action (editor_actions, "finish-add-range", _("Finish Add Range"), sigc::bind (sigc::mem_fun(*this, &Editor::keyboard_selection_finish), true)); ActionManager::session_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "extend-range-to-end-of-region", _("Extend Range to End of Region"), sigc::bind (sigc::mem_fun(*this, &Editor::extend_selection_to_end_of_region), false)); @@ -598,6 +558,8 @@ Editor::register_actions () act = ActionManager::register_action (editor_actions, "remove-last-capture", _("Remove Last Capture"), (sigc::mem_fun(*this, &Editor::remove_last_capture))); ActionManager::session_sensitive_actions.push_back (act); + ActionManager::register_toggle_action (editor_actions, "toggle-stationary-playhead", _("Stationary Playhead"), (mem_fun(*this, &Editor::toggle_stationary_playhead))); + act = ActionManager::register_action (editor_actions, "insert-time", _("Insert Time"), (sigc::mem_fun(*this, &Editor::do_insert_time))); ActionManager::session_sensitive_actions.push_back (act); ActionManager::track_selection_sensitive_actions.push_back (act); @@ -615,6 +577,7 @@ Editor::register_actions () act = ActionManager::register_action (editor_actions, "fit-tracks", _("Fit Selected Tracks"), sigc::mem_fun(*this, &Editor::fit_selected_tracks)); ActionManager::session_sensitive_actions.push_back (act); + ActionManager::track_selection_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "track-height-largest", _("Largest"), sigc::bind ( sigc::mem_fun(*this, &Editor::set_track_height), TimeAxisView::hLargest)); ActionManager::session_sensitive_actions.push_back (act); @@ -660,15 +623,6 @@ Editor::register_actions () Glib::RefPtr mouse_mode_actions = ActionGroup::create (X_("MouseMode")); RadioAction::Group mouse_mode_group; - ARDOUR_UI::instance()->tooltips().set_tip (mouse_move_button, _("Select/Move Objects")); - ARDOUR_UI::instance()->tooltips().set_tip (mouse_select_button, _("Select/Move Ranges")); - ARDOUR_UI::instance()->tooltips().set_tip (mouse_gain_button, _("Draw Gain Automation")); - ARDOUR_UI::instance()->tooltips().set_tip (mouse_zoom_button, _("Select Zoom Range")); - ARDOUR_UI::instance()->tooltips().set_tip (mouse_timefx_button, _("Stretch/Shrink Regions")); - ARDOUR_UI::instance()->tooltips().set_tip (mouse_audition_button, _("Listen to Specific Regions")); - /* in the future, this may allow other kinds of "intra-region" editing, but for now its just MIDI */ - ARDOUR_UI::instance()->tooltips().set_tip (internal_edit_button, _("Edit MIDI Notes")); - act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-object", _("Object Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseObject)); act->connect_proxy (mouse_move_button); mouse_move_button.set_image (*(manage (new Image (::get_icon("tool_object"))))); @@ -683,7 +637,12 @@ Editor::register_actions () mouse_select_button.set_name ("MouseModeButton"); mouse_select_button.get_image ()->show (); - act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-gain", _("Gain Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseGain)); + join_object_range_button.set_image (*(manage (new Image (::get_icon ("tool_object_range"))))); + join_object_range_button.set_label (""); + join_object_range_button.set_name ("MouseModeButton"); + join_object_range_button.get_image ()->show (); + + act = ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-gain", _("Gain Tool"), sigc::bind (mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseGain)); act->connect_proxy (mouse_gain_button); mouse_gain_button.set_image (*(manage (new Image (::get_icon("tool_gain"))))); mouse_gain_button.set_label (""); @@ -749,20 +708,20 @@ Editor::register_actions () RadioAction::Group snap_choice_group; ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-cd-frame"), _("Snap to CD Frame"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToCDFrame))); - ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-timecode-frame"), _("Snap to Timecode frame"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToTimecodeFrame))); - ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-timecode-seconds"), _("Snap to Timecode seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToTimecodeSeconds))); - ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-timecode-minutes"), _("Snap to Timecode minutes"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToTimecodeMinutes))); + ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-timecode-frame"), _("Snap to Timecode Frame"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToTimecodeFrame))); + ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-timecode-seconds"), _("Snap to Timecode Seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToTimecodeSeconds))); + ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-timecode-minutes"), _("Snap to Timecode Minutes"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToTimecodeMinutes))); ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-seconds"), _("Snap to Seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToSeconds))); ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-minutes"), _("Snap to Minutes"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToMinutes))); - ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirtyseconds"), _("Snap to Thirtyseconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToAThirtysecondBeat))); - ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-asixteenthbeat"), _("Snap to Asixteenthbeat"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToASixteenthBeat))); + ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirtyseconds"), _("Snap to Thirty Seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToAThirtysecondBeat))); + ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-asixteenthbeat"), _("Snap to A Sixteenth Beat"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToASixteenthBeat))); ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-eighths"), _("Snap to Eighths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToAEighthBeat))); ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-quarters"), _("Snap to Quarters"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToAQuarterBeat))); ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirds"), _("Snap to Thirds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToAThirdBeat))); ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-beat"), _("Snap to Beat"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeat))); ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-bar"), _("Snap to Bar"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBar))); ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-mark"), _("Snap to Mark"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToMark))); - ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-start"), _("Snap to Region start"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToRegionStart))); + ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-start"), _("Snap to Region Start"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToRegionStart))); ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-end"), _("Snap to Region End"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToRegionEnd))); ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-sync"), _("Snap to Region Sync"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToRegionSync))); ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-boundary"), _("Snap to Region Boundary"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToRegionBoundary))); @@ -817,7 +776,7 @@ Editor::register_actions () ActionManager::region_list_selection_sensitive_actions.push_back (act); act = ActionManager::register_action (rl_actions, X_("rlHide"), _("Hide"), sigc::mem_fun(*this, &Editor::hide_region_from_region_list)); ActionManager::region_list_selection_sensitive_actions.push_back (act); - act = ActionManager::register_action (rl_actions, X_("rlRemove"), _("Remove"), sigc::mem_fun (*_regions, &EditorRegions::remove_region)); + act = ActionManager::register_action (rl_actions, X_("rlShow"), _("Show"), sigc::mem_fun(*this, &Editor::show_region_in_region_list)); ActionManager::region_list_selection_sensitive_actions.push_back (act); ActionManager::register_toggle_action (rl_actions, X_("rlShowAll"), _("Show All"), sigc::mem_fun(*_regions, &EditorRegions::toggle_full)); ActionManager::register_toggle_action (rl_actions, X_("rlShowAuto"), _("Show Automatic Regions"), sigc::mem_fun (*_regions, &EditorRegions::toggle_show_auto_regions)); @@ -862,8 +821,6 @@ Editor::register_actions () act = ActionManager::register_action (editor_actions, X_("importFromSession"), _("Import From Session"), sigc::mem_fun(*this, &Editor::session_import_dialog)); ActionManager::write_sensitive_actions.push_back (act); - ActionManager::register_toggle_action (editor_actions, X_("ToggleWaveformsWhileRecording"), _("Show Waveforms While Recording"), sigc::mem_fun (*this, &Editor::toggle_waveforms_while_recording)); - ActionManager::register_toggle_action (editor_actions, X_("ToggleSummary"), _("Show Summary"), sigc::mem_fun (*this, &Editor::set_summary)); ActionManager::register_toggle_action (editor_actions, X_("ToggleGroupTabs"), _("Show Group Tabs"), sigc::mem_fun (*this, &Editor::set_group_tabs)); @@ -940,23 +897,13 @@ Editor::toggle_ruler_visibility (RulerType rt) } } -void -Editor::toggle_waveforms_while_recording () -{ - Glib::RefPtr act = ActionManager::get_action (X_("Editor"), X_("ToggleWaveformsWhileRecording")); - if (act) { - Glib::RefPtr tact = Glib::RefPtr::cast_dynamic(act); - set_show_waveforms_recording (tact->get_active()); - } -} - void Editor::set_summary () { Glib::RefPtr act = ActionManager::get_action (X_("Editor"), X_("ToggleSummary")); if (act) { Glib::RefPtr tact = Glib::RefPtr::cast_dynamic (act); - session->config.set_show_summary (tact->get_active ()); + _session->config.set_show_summary (tact->get_active ()); } } @@ -966,7 +913,7 @@ Editor::set_group_tabs () Glib::RefPtr act = ActionManager::get_action (X_("Editor"), X_("ToggleGroupTabs")); if (act) { Glib::RefPtr tact = Glib::RefPtr::cast_dynamic (act); - session->config.set_show_group_tabs (tact->get_active ()); + _session->config.set_show_group_tabs (tact->get_active ()); } } @@ -1350,11 +1297,11 @@ Editor::parameter_changed (std::string p) toggle_meter_updating(); } else if (p == "show-summary") { - bool const s = session->config.get_show_summary (); + bool const s = _session->config.get_show_summary (); if (s) { - _summary->show (); + _summary_hbox.show (); } else { - _summary->hide (); + _summary_hbox.hide (); } Glib::RefPtr act = ActionManager::get_action (X_("Editor"), X_("ToggleSummary")); @@ -1366,7 +1313,7 @@ Editor::parameter_changed (std::string p) } } else if (p == "show-group-tabs") { - bool const s = session->config.get_show_group_tabs (); + bool const s = _session->config.get_show_group_tabs (); if (s) { _group_tabs->show (); } else {