X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Feditor_actions.cc;h=e9448858b488fff21c7f767a17e0344c341e7a00;hb=842c33fba81ee7d360bb347a9a011582f6aac95f;hp=a5edaf575912c5496797fe36abe4d3be350817ae;hpb=ff4e9cc1df27ba1b1220176b4752ee6bc19f177d;p=ardour.git diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index a5edaf5759..e9448858b4 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -301,8 +301,8 @@ Editor::register_actions () act = reg_sens (editor_actions, "scroll-tracks-up", _("Scroll Tracks Up"), sigc::mem_fun(*this, &Editor::scroll_tracks_up)); act = reg_sens (editor_actions, "scroll-tracks-down", _("Scroll Tracks Down"), sigc::mem_fun(*this, &Editor::scroll_tracks_down)); - act = reg_sens (editor_actions, "step-tracks-up", _("Step Tracks Up"), sigc::mem_fun(*this, &Editor::scroll_tracks_up_line)); - act = reg_sens (editor_actions, "step-tracks-down", _("Step Tracks Down"), sigc::mem_fun(*this, &Editor::scroll_tracks_down_line)); + act = reg_sens (editor_actions, "step-tracks-up", _("Step Tracks Up"), sigc::hide_return (sigc::bind (sigc::mem_fun(*this, &Editor::scroll_up_one_track), true))); + act = reg_sens (editor_actions, "step-tracks-down", _("Step Tracks Down"), sigc::hide_return (sigc::bind (sigc::mem_fun(*this, &Editor::scroll_down_one_track), true))); reg_sens (editor_actions, "scroll-backward", _("Scroll Backward"), sigc::bind (sigc::mem_fun(*this, &Editor::scroll_backward), 0.8f)); reg_sens (editor_actions, "scroll-forward", _("Scroll Forward"), sigc::bind (sigc::mem_fun(*this, &Editor::scroll_forward), 0.8f)); @@ -748,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 @@ -1726,54 +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->is_toplevel()) { - /* Setting the focus widget to a Gtk::Window causes all - * subsequent calls to ::has_focus() on the nominal - * focus widget in that window to return - * false. Workaround: never set focus to the toplevel - * itself. - */ - break; - } - - if (w->get_can_focus ()) { - Window* win = dynamic_cast (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) { @@ -1873,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 (