From e205bb98a1dd02ae5ff99a9f8a81a370e5c512b5 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 1 Jun 2024 18:27:43 -0600 Subject: [PATCH] manual fixes after a substantial rebase --- gtk2_ardour/editor.cc | 66 ------------------------------------- gtk2_ardour/editor_mouse.cc | 2 +- 2 files changed, 1 insertion(+), 67 deletions(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index cb31ac5516..79bee82c33 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -350,8 +350,6 @@ Editor::Editor () , _track_selection_change_without_scroll (false) , _editor_track_selection_change_without_scroll (false) , _section_box (0) - , _playhead_cursor (0) - , _snapped_cursor (0) , range_bar_drag_rect (0) , transport_bar_preroll_rect (0) , transport_bar_postroll_rect (0) @@ -2897,70 +2895,6 @@ Editor::build_edit_mode_menu () ripple_mode_selector.set_sizing_texts (ripple_mode_strings); } -void -Editor::build_grid_type_menu () -{ - using namespace Menu_Helpers; - - /* there's no Grid, but if Snap is engaged, the Snap preferences will be applied */ - grid_type_selector.AddMenuElem (MenuElem (grid_type_strings[(int)GridTypeNone], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeNone))); - grid_type_selector.AddMenuElem(SeparatorElem()); - - /* musical grid: bars, quarter-notes, etc */ - grid_type_selector.AddMenuElem (MenuElem (grid_type_strings[(int)GridTypeBar], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBar))); - grid_type_selector.AddMenuElem (MenuElem (grid_type_strings[(int)GridTypeBeat], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeat))); - grid_type_selector.AddMenuElem (MenuElem (grid_type_strings[(int)GridTypeBeatDiv2], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeatDiv2))); - grid_type_selector.AddMenuElem (MenuElem (grid_type_strings[(int)GridTypeBeatDiv4], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeatDiv4))); - grid_type_selector.AddMenuElem (MenuElem (grid_type_strings[(int)GridTypeBeatDiv8], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeatDiv8))); - grid_type_selector.AddMenuElem (MenuElem (grid_type_strings[(int)GridTypeBeatDiv16], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeatDiv16))); - grid_type_selector.AddMenuElem (MenuElem (grid_type_strings[(int)GridTypeBeatDiv32], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeatDiv32))); - - /* triplet grid */ - grid_type_selector.AddMenuElem(SeparatorElem()); - Gtk::Menu *_triplet_menu = manage (new Menu); - MenuList& triplet_items (_triplet_menu->items()); - { - triplet_items.push_back (MenuElem (grid_type_strings[(int)GridTypeBeatDiv3], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeatDiv3))); - triplet_items.push_back (MenuElem (grid_type_strings[(int)GridTypeBeatDiv6], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeatDiv6))); - triplet_items.push_back (MenuElem (grid_type_strings[(int)GridTypeBeatDiv12], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeatDiv12))); - triplet_items.push_back (MenuElem (grid_type_strings[(int)GridTypeBeatDiv24], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeatDiv24))); - } - grid_type_selector.AddMenuElem (Menu_Helpers::MenuElem (_("Triplets"), *_triplet_menu)); - - /* quintuplet grid */ - Gtk::Menu *_quintuplet_menu = manage (new Menu); - MenuList& quintuplet_items (_quintuplet_menu->items()); - { - quintuplet_items.push_back (MenuElem (grid_type_strings[(int)GridTypeBeatDiv5], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeatDiv5))); - quintuplet_items.push_back (MenuElem (grid_type_strings[(int)GridTypeBeatDiv10], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeatDiv10))); - quintuplet_items.push_back (MenuElem (grid_type_strings[(int)GridTypeBeatDiv20], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeatDiv20))); - } - grid_type_selector.AddMenuElem (Menu_Helpers::MenuElem (_("Quintuplets"), *_quintuplet_menu)); - - /* septuplet grid */ -#if 0 - /* Septuplets suffer from drifting and can't be draw properly until libtemporal handles fractional ticks - * or if ticks_per_beat (ppqn) is raised to a point where the result - * of Temporal::ticks_per_beat / beat_div is always an integer - */ - Gtk::Menu *_septuplet_menu = manage (new Menu); - MenuList& septuplet_items (_septuplet_menu->items()); - { - septuplet_items.push_back (MenuElem (grid_type_strings[(int)GridTypeBeatDiv7], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeatDiv7))); - septuplet_items.push_back (MenuElem (grid_type_strings[(int)GridTypeBeatDiv14], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeatDiv14))); - septuplet_items.push_back (MenuElem (grid_type_strings[(int)GridTypeBeatDiv28], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeatDiv28))); - } - grid_type_selector.AddMenuElem (Menu_Helpers::MenuElem (_("Septuplets"), *_septuplet_menu)); -#endif - - grid_type_selector.AddMenuElem(SeparatorElem()); - grid_type_selector.AddMenuElem (MenuElem (grid_type_strings[(int)GridTypeTimecode], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeTimecode))); - grid_type_selector.AddMenuElem (MenuElem (grid_type_strings[(int)GridTypeMinSec], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeMinSec))); - grid_type_selector.AddMenuElem (MenuElem (grid_type_strings[(int)GridTypeCDFrame], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeCDFrame))); - - grid_type_selector.set_sizing_texts (grid_type_strings); -} - void Editor::build_draw_midi_menus () { diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index d16c9b9abe..110ecf6bc7 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -679,7 +679,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT } return true; case SceneMarkerItem: - _drags->set (new MarkerDrag (this, item), event); + _drags->set (new MarkerDrag (*this, item), event); return true; case TempoMarkerItem: