restore many keybindings from ardour 0.99
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 7 Feb 2006 13:58:33 +0000 (13:58 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 7 Feb 2006 13:58:33 +0000 (13:58 +0000)
git-svn-id: svn://localhost/trunk/ardour2@313 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/ardour.bindings
gtk2_ardour/ardour.menus
gtk2_ardour/ardour_ui_ed.cc
gtk2_ardour/editor.cc
gtk2_ardour/editor_actions.cc
gtk2_ardour/editor_ops.cc
gtk2_ardour/time_axis_view.cc
libs/ardour/ladspa_plugin.cc

index 333561501ba4e1eeb506248ca4af6debd7c2e820..7fb9f4de437bb7e21f2e348d1c5c738dfc6b64d1 100644 (file)
@@ -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")
 (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")
 
 (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")
 
 
index 134feaefe7e581e4e49f3ed7c5b835b8c9d1ecf1..6de0eb2fcfc4a60b91525bdd6438d606dfa65ae9 100644 (file)
                <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'/>
                    <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'>
         <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'/>
                        <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>
index 70b9c928bc9085d9cb5cb3febdd5914735cddb1b..4109999c3c1cf26b3114c46e92ec7800fe53b049 100644 (file)
@@ -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));
index 55b10bc77cc3cd2348f23ee30c1456d7d63a55df..ebaab5d75541b3ebd30d59b8f6a6f697e4465780 100644 (file)
@@ -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;
index 26718e25d1cd90d8f1954da884e6422ec367a2ee..5d462055b0b0a036f2e932a4c6b147624388b816 100644 (file)
@@ -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;
index e8d0763164f05816bda561462e3822bd9306d1da..7191b81b7bc2dbdc72fde755bc734cf57aee0fab 100644 (file)
@@ -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 ();
 }
index 52d38eeea1ab026078acf5404a63e8629ce303e3..8b1b2fa99974b629874990f1edc576105649c200 100644 (file)
@@ -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) {
index 2c72eb6b12479443b91e182c78a16a21bc617a6a..1262b7e250b2c21c47a63887c853216896656cf6 100644 (file)
@@ -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++;
                        }
                }