diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-02-07 13:58:33 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-02-07 13:58:33 +0000 |
commit | da093c7939159c805039ee8aa85dde68656327e9 (patch) | |
tree | 34b3e07218e2f68869f45e9cc31e103a85c9cecb | |
parent | c7ed1141eb17b87b74a7d6de2e63e24136657392 (diff) |
restore many keybindings from ardour 0.99
git-svn-id: svn://localhost/trunk/ardour2@313 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/ardour.bindings | 40 | ||||
-rw-r--r-- | gtk2_ardour/ardour.menus | 47 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui_ed.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/editor.cc | 12 | ||||
-rw-r--r-- | gtk2_ardour/editor_actions.cc | 15 | ||||
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 6 | ||||
-rw-r--r-- | libs/ardour/ladspa_plugin.cc | 6 |
8 files changed, 86 insertions, 46 deletions
diff --git a/gtk2_ardour/ardour.bindings b/gtk2_ardour/ardour.bindings index 333561501b..7fb9f4de43 100644 --- a/gtk2_ardour/ardour.bindings +++ b/gtk2_ardour/ardour.bindings @@ -1,7 +1,7 @@ ; this file is NOT an automated accelerator map dump (gtk_accel_path "<Actions>/Transport/ToggleRoll" "space") -(gtk_accel_path "<Actions>/Transport/ToggleRollForgetCapture" "<Control>space") +(gtk_accel_path "<Actions>/Transport/ToggleRollForgetCapture" "<control>space") (gtk_accel_path "<Actions>/Transport/Forward" "<control>Right") (gtk_accel_path "<Actions>/Transport/Rewind" "<control>Left") (gtk_accel_path "<Actions>/Transport/GotoStart" "Home") @@ -11,31 +11,43 @@ (gtk_accel_path "<Actions>/Editor/crop" "c") (gtk_accel_path "<Actions>/Editor/duplicate-region" "d") (gtk_accel_path "<Actions>/Editor/set-edit-cursor" "e") -(gtk_accel_path "<Actions>/Editor/show-editor-mixer" "<shift>e") +(gtk_accel_path "<Actions>/MouseMode/set-mouse-mode-gain" "g") (gtk_accel_path "<Actions>/Editor/split-region" "s") (gtk_accel_path "<Actions>/Editor/set-region-sync-position" "v") (gtk_accel_path "<Actions>/Editor/mute-unmute-region" "m") (gtk_accel_path "<Actions>/Editor/insert-region" "i") (gtk_accel_path "<Actions>/Editor/normalize-region" "n") +(gtk_accel_path "<Actions>/MouseMode/set-mouse-mode-object" "o") (gtk_accel_path "<Actions>/Transport/loop" "l") (gtk_accel_path "<Actions>/Editor/set-playhead" "p") +(gtk_accel_path "<Actions>/MouseMode/set-mouse-mode-range" "r") +(gtk_accel_path "<Actions>/MouseMode/set-mouse-mode-timefx" "t") +(gtk_accel_path "<Actions>/MouseMode/set-mouse-mode-zoom" "z") + (gtk_accel_path "<Actions>/Transport/Record" "<shift>r") + (gtk_accel_path "<Actions>/Editor/nudge-forward" "KP_Add") (gtk_accel_path "<Actions>/Editor/nudge-next-forward" "<control>KP_Add") (gtk_accel_path "<Actions>/Editor/nudge-backward" "KP_Subtract") (gtk_accel_path "<Actions>/Editor/nudge-next-backward" "<control>KP_Subtract") -(gtk-accel_path "<Actions>/Common/GotoEditor" "<Alt>e") -(gtk-accel_path "<Actions>/Common/GotoMixer" "<Alt>m") +(gtk_accel_path "<Actions>/Editor/show-editor-mixer" "<shift>e") -(gtk_accel_path "<Actions>/Editor/editor-copy" "<Control>c") -(gtk_accel_path "<Actions>/Common/Quit" "<Control>q") -(gtk_accel_path "<Actions>/Editor/redo" "<Control>r") -(gtk_accel_path "<Actions>/Common/Save" "<Control>s") -(gtk_accel_path "<Actions>/Editor/editor-paste" "<Control>v") -(gtk_accel_path "<Actions>/Editor/editor-cut" "<Control>x") -(gtk_accel_path "<Actions>/Editor/undo" "<Control>z") +(gtk_accel_path "<Actions>/Common/goto-editor" "<alt>e") +(gtk_accel_path "<Actions>/Common/goto-mixer" "<alt>m") +(gtk-accel_path "<Actions>/Common/ToggleSoundFileBrowser" "<alt>f") +(gtk-accel_path "<Actions>/Common/ToggleLocations" "<alt>l") +(gtk-accel_path "<Actions>/Common/ToggleBigClock" "<alt>b") + +(gtk_accel_path "<Actions>/Editor/editor-copy" "<control>c") +(gtk_accel_path "<Actions>/Common/Quit" "<control>q") +(gtk_accel_path "<Actions>/Editor/redo" "<control>r") +(gtk_accel_path "<Actions>/Common/Save" "<control>s") +(gtk_accel_path "<Actions>/Editor/editor-paste" "<control>v") +(gtk_accel_path "<Actions>/Editor/editor-cut" "<control>x") +(gtk_accel_path "<Actions>/Editor/editor-delete" "Delete") +(gtk_accel_path "<Actions>/Editor/undo" "<control>z") (gtk_accel_path "<Actions>/Editor/scroll-tracks-down" "Page_Down") (gtk_accel_path "<Actions>/Editor/scroll-tracks-up" "Page_Up") @@ -86,6 +98,12 @@ (gtk_accel_path "<Actions>/Editor/jump-forward-to-mark" "<control>KP_Right") (gtk_accel_path "<Actions>/Editor/jump-backward-to-mark" "<control>KP_Left") + +(gtk_accel_path "<Actions>/Editor/start-range" "<control>KP_Down") +(gtk_accel_path "<Actions>/Editor/finish-range" "<control>KP_Up") +(gtk_accel_path "<Actions>/Editor/finish-add-range" "<shift><control>KP_Up") + + (gtk_accel_path "<Actions>/Editor/add-location-from-playhead" "KP_Enter") diff --git a/gtk2_ardour/ardour.menus b/gtk2_ardour/ardour.menus index 134feaefe7..6de0eb2fcf 100644 --- a/gtk2_ardour/ardour.menus +++ b/gtk2_ardour/ardour.menus @@ -65,12 +65,17 @@ <menuitem action='undo'/> <menuitem action='redo'/> <menuitem action='editor-cut'/> + <menuitem action='editor-delete'/> <menuitem action='editor-copy'/> <menuitem action='editor-paste'/> <separator/> - <menuitem action='extend-range-to-start-of-region'/> - <menuitem action='extend-range-to-end-of-region'/> - <separator/> + <menu action="EditSelectRangeOptions"> + <menuitem action='extend-range-to-start-of-region'/> + <menuitem action='extend-range-to-end-of-region'/> + <menuitem action='start-range'/> + <menuitem action='finish-range'/> + <menuitem action='finish-add-range'/> + </menu> <menu action="EditSelectRegionOptions"> <menuitem action='select-all'/> <menuitem action='select-all-after-edit-cursor'/> @@ -80,29 +85,29 @@ <menuitem action='select-all-in-punch-range'/> <menuitem action='select-all-in-loop-range'/> </menu> - <menu action='EditCursorMovementOptions'> - <menuitem action='edit-cursor-to-next-region-start'/> + <menu action='EditCursorMovementOptions'> + <menuitem action='edit-cursor-to-next-region-start'/> <menuitem action='edit-cursor-to-next-region-end'/> - <menuitem action='edit-cursor-to-previous-region-start'/> + <menuitem action='edit-cursor-to-previous-region-start'/> <menuitem action='edit-cursor-to-previous-region-end'/> - <menuitem action='edit-cursor-to-next-region-sync'/> + <menuitem action='edit-cursor-to-next-region-sync'/> <menuitem action='edit-cursor-to-previous-region-sync'/> - <menuitem action='center-edit-cursor'/> + <menuitem action='center-edit-cursor'/> <menuitem action='edit-to-playhead'/> <menuitem action='edit-cursor-to-range-start'/> - <menuitem action='edit-cursor-to-range-end'/> - </menu> - <menu action='RegionEditOps'> + <menuitem action='edit-cursor-to-range-end'/> + </menu> + <menu action='RegionEditOps'> <menuitem action='crop'/> <menuitem action='duplicate-region'/> <menuitem action='insert-region'/> <menuitem action='normalize-region'/> <separator/> - <menuitem action="nudge-forward"/> - <menuitem action="nudge-next-forward"/> - <menuitem action="nudge-backward"/> - <menuitem action="nudge-next-backward"/> - </menu> + <menuitem action="nudge-forward"/> + <menuitem action="nudge-next-forward"/> + <menuitem action="nudge-backward"/> + <menuitem action="nudge-next-backward"/> + </menu> </menu> <menu name='View' action = 'View'> <menu name='ZoomFocus' action='ZoomFocus'> @@ -167,8 +172,8 @@ <menu name='Windows' action = 'Windows'> <menuitem action='ToggleMaximalEditor'/> <separator/> - <menuitem action='GotoEditor'/> - <menuitem action='GotoMixer'/> + <menuitem action='goto-editor'/> + <menuitem action='goto-mixer'/> <menuitem action='ToggleOptionsEditor'/> <menuitem action='ToggleSoundFileBrowser'/> <menuitem action='ToggleConnections'/> @@ -222,6 +227,12 @@ <menuitem action='set-playhead'/> <menuitem action='split-region'/> <menuitem action='set-region-sync-position'/> + <separator/> + <menuitem action='set-mouse-mode-object'/> + <menuitem action='set-mouse-mode-range'/> + <menuitem action='set-mouse-mode-gain'/> + <menuitem action='set-mouse-mode-zoom'/> + <menuitem action='set-mouse-mode-timefx'/> </menu> </menu> </menubar> diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index 70b9c928bc..4109999c3c 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -165,8 +165,8 @@ ARDOUR_UI::install_actions () ActionManager::register_toggle_action (common_actions, X_("ToggleMaximalEditor"), _("maximise editor space"), mem_fun (*this, &ARDOUR_UI::toggle_editing_space)); - ActionManager::register_action (common_actions, X_("GotoEditor"), _("Editor"), mem_fun(*this, &ARDOUR_UI::goto_editor_window)); - ActionManager::register_action (common_actions, X_("GotoMixer"), _("Mixer"), mem_fun(*this, &ARDOUR_UI::goto_mixer_window)); + ActionManager::register_action (common_actions, X_("goto-editor"), _("show editor"), mem_fun(*this, &ARDOUR_UI::goto_editor_window)); + ActionManager::register_action (common_actions, X_("goto-mixer"), _("show mixer"), mem_fun(*this, &ARDOUR_UI::goto_mixer_window)); ActionManager::register_toggle_action (common_actions, X_("ToggleSoundFileBrowser"), _("Sound File Browser"), mem_fun(*this, &ARDOUR_UI::toggle_sound_file_browser)); ActionManager::register_toggle_action (common_actions, X_("ToggleOptionsEditor"), _("Options Editor"), mem_fun(*this, &ARDOUR_UI::toggle_options_window)); act = ActionManager::register_toggle_action (common_actions, X_("ToggleInspector"), _("Track/Bus Inspector"), mem_fun(*this, &ARDOUR_UI::toggle_route_params_window)); diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 55b10bc77c..ebaab5d755 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -880,8 +880,14 @@ Editor::set_frames_per_unit (double fpu) } if (mouse_mode == MouseRange && selection->time.start () != selection->time.end_frame ()) { - for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) { - (*i)->reshow_selection (selection->time); + if (!selection->tracks.empty()) { + for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) { + (*i)->reshow_selection (selection->time); + } + } else { + for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) { + (*i)->reshow_selection (selection->time); + } } } @@ -2252,8 +2258,6 @@ Editor::get_state () if (act) { Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act); node->add_property (X_("show-editor-mixer"), tact->get_active() ? "yes" : "no"); - } else { - cerr << "no show editor mixer action\n"; } return *node; diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index 26718e25d1..5d462055b0 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -24,8 +24,10 @@ Editor::register_actions () ActionManager::register_action (editor_actions, X_("Edit"), _("Edit")); ActionManager::register_action (editor_actions, X_("EditSelectRegionOptions"), _("Select regions")); + ActionManager::register_action (editor_actions, X_("EditSelectRangeOptions"), _("Select range operations")); ActionManager::register_action (editor_actions, X_("EditCursorMovementOptions"), _("Move edit cursor")); ActionManager::register_action (editor_actions, X_("RegionEditOps"), _("Region operations")); + ActionManager::register_action (editor_actions, X_("Tools"), _("Tools")); ActionManager::register_action (editor_actions, X_("View"), _("View")); ActionManager::register_action (editor_actions, X_("ZoomFocus"), _("ZoomFocus")); ActionManager::register_action (editor_actions, X_("MeterHold"), _("Meter hold")); @@ -189,6 +191,9 @@ Editor::register_actions () act = ActionManager::register_action (editor_actions, "editor-cut", _("Cut"), mem_fun(*this, &Editor::cut)); ActionManager::session_sensitive_actions.push_back (act); + /* Note: for now, editor-delete does the exact same thing as editor-cut */ + act = ActionManager::register_action (editor_actions, "editor-delete", _("Delete"), mem_fun(*this, &Editor::cut)); + ActionManager::session_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "editor-copy", _("Copy"), mem_fun(*this, &Editor::copy)); ActionManager::session_sensitive_actions.push_back (act); act = ActionManager::register_action (editor_actions, "editor-paste", _("Paste"), mem_fun(*this, &Editor::keyboard_paste)); @@ -245,11 +250,11 @@ Editor::register_actions () Glib::RefPtr<ActionGroup> mouse_mode_actions = ActionGroup::create (X_("MouseMode")); RadioAction::Group mouse_mode_group; - ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-object", _("set mouse mode object"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseObject, false)); - ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-range", _("set mouse mode range"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseRange, false)); - ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-gain", _("set mouse mode gain"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseGain, false)); - ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-zoom", _("set mouse mode zoom"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseZoom, false)); - ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-timefx", _("set mouse mode timefx"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseTimeFX, false)); + ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-object", _("_object tool"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseObject, false)); + ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-range", _("_range tool"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseRange, false)); + ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-gain", _("_gain tool"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseGain, false)); + ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-zoom", _("_zoom tool"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseZoom, false)); + ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-timefx", _("_timefx tool"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseTimeFX, false)); Glib::RefPtr<ActionGroup> snap_actions = ActionGroup::create (X_("Snap")); RadioAction::Group snap_choice_group; diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index e8d0763164..7191b81b7b 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -2940,7 +2940,7 @@ Editor::trim_region_from_edit_cursor () begin_reversible_command (_("trim to edit")); session->add_undo (region.playlist()->get_memento()); - region.trim_end( session_frame_to_track_frame(edit_cursor->current_frame, speed), this); + region.trim_front ( session_frame_to_track_frame(edit_cursor->current_frame, speed), this); session->add_redo_no_execute (region.playlist()->get_memento()); commit_reversible_command (); } diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 52d38eeea1..8b1b2fa999 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -616,8 +616,8 @@ TimeAxisView::show_selection (TimeSelection& ts) rect = get_selection_rect ((*i).id); - x1 = start / editor.get_current_zoom(); - x2 = (start + cnt - 1) / editor.get_current_zoom(); + x1 = editor.frame_to_unit (start); + x2 = editor.frame_to_unit (start + cnt - 1); y2 = height; rect->rect->property_x1() = x1; @@ -653,6 +653,8 @@ TimeAxisView::show_selection (TimeSelection& ts) void TimeAxisView::reshow_selection (TimeSelection& ts) { + cerr << name() << ": reshow selection" << endl; + show_selection (ts); for (vector<TimeAxisView*>::iterator i = children.begin(); i != children.end(); ++i) { diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc index 2c72eb6b12..1262b7e250 100644 --- a/libs/ardour/ladspa_plugin.cc +++ b/libs/ardour/ladspa_plugin.cc @@ -611,14 +611,14 @@ LadspaPlugin::connect_and_run (vector<Sample*>& bufs, uint32_t nbufs, int32_t& i if (LADSPA_IS_PORT_INPUT (port_descriptor(port_index))) { connect_port (port_index, bufs[min((uint32_t) in_index,nbufs)] + offset); //cerr << this << ' ' << name() << " @ " << offset << " inport " << in_index << " = buf " - //<< min((uint32_t)in_index,nbufs) << " = " << &bufs[min((uint32_t)in_index,nbufs)][offset] << endl; + // << min((uint32_t)in_index,nbufs) << " = " << &bufs[min((uint32_t)in_index,nbufs)][offset] << endl; in_index++; } else if (LADSPA_IS_PORT_OUTPUT (port_descriptor (port_index))) { connect_port (port_index, bufs[min((uint32_t) out_index,nbufs)] + offset); - //cerr << this << ' ' << name() << " @ " << offset << " outport " << out_index << " = buf " - //<< min((uint32_t)out_index,nbufs) << " = " << &bufs[min((uint32_t)out_index,nbufs)][offset] << endl; + // cerr << this << ' ' << name() << " @ " << offset << " outport " << out_index << " = buf " + // << min((uint32_t)out_index,nbufs) << " = " << &bufs[min((uint32_t)out_index,nbufs)][offset] << endl; out_index++; } } |