From d8ba73f542da9110b920d16e158053ea782fcfbf Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 23 May 2022 08:06:45 -0600 Subject: [PATCH] temporal: change "clamped" terminology to "continuing" (since that's what the GUI calls it) (GUI edition) --- gtk2_ardour/editor.h | 2 +- gtk2_ardour/editor_drag.cc | 12 ++++++------ gtk2_ardour/editor_markers.cc | 13 +++++++------ 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 1724aaf86d..761d39fce4 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -1801,7 +1801,7 @@ private: void marker_menu_remove (); void marker_menu_rename (); void rename_marker (ArdourMarker* marker); - void toggle_tempo_clamped (); + void toggle_tempo_continues (); void toggle_tempo_type (); void ramp_to_next_tempo (); void toggle_marker_menu_lock (); diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index ada921aca8..eb3d753c7c 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -3679,7 +3679,7 @@ BBTRulerDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor) _editor->tempo_curve_selected (_tempo, true); ostringstream sstr; - if (_tempo->clamped()) { + if (_tempo->continuing()) { TempoPoint const * prev = map->previous_tempo (*_tempo); if (prev) { sstr << "end: " << fixed << setprecision(3) << prev->end_note_types_per_minute() << "\n"; @@ -3734,7 +3734,7 @@ BBTRulerDrag::motion (GdkEvent* event, bool first_move) } ostringstream sstr; - if (_tempo->clamped()) { + if (_tempo->continuing()) { TempoPoint const * prev = map->previous_tempo (*_tempo); if (prev) { _editor->tempo_curve_selected (prev, true); @@ -3786,7 +3786,7 @@ BBTRulerDrag::finished (GdkEvent* event, bool movement_occurred) _editor->tempo_curve_selected (_tempo, false); - if (_tempo->clamped()) { + if (_tempo->continuing()) { TempoPoint const * prev_tempo = map->previous_tempo (*_tempo); @@ -3956,7 +3956,7 @@ TempoEndDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor) sstr << "end: " << fixed << setprecision(3) << map->tempo_at (samples_to_superclock (_tempo->sample (sr) - 1, sr)).end_note_types_per_minute() << "\n"; } - if (_tempo->clamped()) { + if (_tempo->continuing()) { _editor->tempo_curve_selected (_tempo, true); sstr << "start: " << fixed << setprecision(3) << _tempo->note_types_per_minute(); } @@ -3997,7 +3997,7 @@ TempoEndDrag::motion (GdkEvent* event, bool first_move) const samplecnt_t sr = AudioEngine::instance()->sample_rate(); sstr << "end: " << fixed << setprecision(3) << map->tempo_at (samples_to_superclock (_tempo->sample (sr) - 1, sr)).end_note_types_per_minute() << "\n"; - if (_tempo->clamped()) { + if (_tempo->continuing()) { sstr << "start: " << fixed << setprecision(3) << _tempo->note_types_per_minute(); } @@ -4024,7 +4024,7 @@ TempoEndDrag::finished (GdkEvent* event, bool movement_occurred) _editor->tempo_curve_selected (prev, false); } - if (_tempo->clamped()) { + if (_tempo->continuing()) { _editor->tempo_curve_selected (_tempo, false); } diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc index 3a6b911bdb..1d779384f4 100644 --- a/gtk2_ardour/editor_markers.cc +++ b/gtk2_ardour/editor_markers.cc @@ -1151,10 +1151,10 @@ Editor::build_tempo_marker_menu (TempoMarker* loc, bool can_remove) tempo_marker_menu->set_name ("ArdourContextMenu"); if (!loc->tempo().map().is_initial(loc->tempo())) { - if (loc->tempo().clamped()) { - items.push_back (MenuElem (_("Don't Continue"), sigc::mem_fun(*this, &Editor::toggle_tempo_clamped))); + if (loc->tempo().continuing()) { + items.push_back (MenuElem (_("Don't Continue"), sigc::mem_fun(*this, &Editor::toggle_tempo_continues))); } else { - items.push_back (MenuElem (_("Continue"), sigc::mem_fun(*this, &Editor::toggle_tempo_clamped))); + items.push_back (MenuElem (_("Continue"), sigc::mem_fun(*this, &Editor::toggle_tempo_continues))); } } @@ -1626,9 +1626,10 @@ Editor::toggle_tempo_type () TempoMap::update (tmap); } } -/* clamped locks the previous section end tempo to the start tempo */ + +/* "continues" locks the start tempo to the previous section end tempo */ void -Editor::toggle_tempo_clamped () +Editor::toggle_tempo_continues () { TempoMarker* tm; MeterMarker* mm; @@ -1643,7 +1644,7 @@ Editor::toggle_tempo_clamped () reassociate_metric_markers (tmap); Temporal::Tempo const & tempo (tm->tempo()); - const_cast(tempo).set_clamped (!tempo.clamped()); + const_cast(tempo).set_continuing (!tempo.continuing()); XMLNode &after = tmap->get_state(); _session->add_command (new Temporal::TempoCommand (_("change tempo clamp"), &before, &after));