fix_bbtppq: add missing space - no-op
[ardour.git] / gtk2_ardour / editor_actions.cc
index 44c66e36c8d5a4f26b1413c88c4fd518e00b6dbb..b493529b24737f38b1e2e9e15487a6b7644f1626 100644 (file)
@@ -330,6 +330,7 @@ Editor::register_actions ()
 
        reg_sens (editor_actions, "set-playhead", _("Playhead to Mouse"), sigc::mem_fun(*this, &Editor::set_playhead_cursor));
        reg_sens (editor_actions, "set-edit-point", _("Active Marker to Mouse"), sigc::mem_fun(*this, &Editor::set_edit_point));
+       reg_sens (editor_actions, "set-auto-punch-range", _("Set Auto Punch In/Out from Playhead"), sigc::mem_fun(*this, &Editor::set_auto_punch_range));
 
        reg_sens (editor_actions, "duplicate-range", _("Duplicate Range"), sigc::bind (sigc::mem_fun(*this, &Editor::duplicate_range), false));
 
@@ -747,6 +748,11 @@ Editor::register_actions ()
 
        myactions.register_action (editor_actions, X_("toggle-midi-input-active"), _("Toggle MIDI Input Active for Editor-Selected Tracks/Busses"),
                                   sigc::bind (sigc::mem_fun (*this, &Editor::toggle_midi_input_active), false));
+
+
+       /* MIDI stuff */
+       reg_sens (editor_actions, "quantize", _("Quantize"), sigc::mem_fun (*this, &Editor::quantize_region));
+
 }
 
 void
@@ -1725,43 +1731,6 @@ Editor::parameter_changed (std::string p)
        }
 }
 
-void
-Editor::reset_focus (Gtk::Widget* w)
-{
-       /* this resets focus to the first focusable parent of the given widget,
-        * or, if there is no focusable parent, cancels focus in the toplevel
-        * window that the given widget is packed into (if there is one).
-        */
-
-       if (!w) {
-               return;
-       }
-
-       Gtk::Widget* top = w->get_toplevel();
-
-       if (!top || !top->is_toplevel()) {
-               return;
-       }
-
-       w = w->get_parent ();
-
-       while (w) {
-               if (w->get_can_focus ()) {
-                       Window* win = dynamic_cast<Window*> (top);
-                       win->set_focus (*w);
-                       return;
-               }
-               w = w->get_parent ();
-       }
-
-       /* no focusable parent found, cancel focus in top level window.
-          C++ API cannot be used for this. Thanks, references.
-        */
-
-       gtk_window_set_focus (GTK_WINDOW(top->gobj()), 0);
-
-}
-
 void
 Editor::reset_canvas_action_sensitivity (bool onoff)
 {
@@ -1861,7 +1830,7 @@ Editor::register_region_actions ()
                );
 
        /* Duplicate selected regions */
-       reg_sens (_region_actions, "duplicate-region", _("Duplicate"), sigc::bind (sigc::mem_fun (*this, &Editor::duplicate_range), false));
+       reg_sens (_region_actions, "duplicate-region", _("Duplicate"), sigc::bind (sigc::mem_fun (*this, &Editor::duplicate_regions), 1));
 
        /* Open the dialogue to duplicate selected regions multiple times */
        reg_sens (