From 34527525bed80fdd1495303db4808d90ac1d9d15 Mon Sep 17 00:00:00 2001 From: Mads Kiilerich Date: Mon, 3 Oct 2022 20:52:50 +0200 Subject: [PATCH] Consistently put ruler toggle code in the same order Just reordering. --- gtk2_ardour/editor.h | 10 +++++----- gtk2_ardour/editor_actions.cc | 31 +++++++++++++++---------------- gtk2_ardour/editor_rulers.cc | 10 +++++----- 3 files changed, 25 insertions(+), 26 deletions(-) diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 090c457cb5..0bb4e23be0 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -954,16 +954,16 @@ private: ArdourCanvas::Rectangle* _canvas_drop_zone; bool canvas_drop_zone_event (GdkEvent* event); - Glib::RefPtr ruler_timecode_action; - Glib::RefPtr ruler_bbt_action; - Glib::RefPtr ruler_samples_action; Glib::RefPtr ruler_minsec_action; - Glib::RefPtr ruler_tempo_action; + Glib::RefPtr ruler_timecode_action; + Glib::RefPtr ruler_samples_action; + Glib::RefPtr ruler_bbt_action; Glib::RefPtr ruler_meter_action; - Glib::RefPtr ruler_marker_action; + Glib::RefPtr ruler_tempo_action; Glib::RefPtr ruler_range_action; Glib::RefPtr ruler_loop_punch_action; Glib::RefPtr ruler_cd_marker_action; + Glib::RefPtr ruler_marker_action; Glib::RefPtr ruler_cue_marker_action; bool no_ruler_shown_update; diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index 4630c379b9..ffe5089f77 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -700,17 +700,17 @@ Editor::register_actions () /* RULERS */ Glib::RefPtr ruler_actions = ActionManager::create_action_group (bindings, X_("Rulers")); - ruler_tempo_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-tempo-ruler"), _("Tempo"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); - ruler_meter_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-meter-ruler"), _("Time Signature"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); - ruler_range_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-range-ruler"), _("Range Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); - ruler_marker_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-marker-ruler"), _("Location Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); - ruler_cd_marker_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-cd-marker-ruler"), _("CD Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); - ruler_cue_marker_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-cue-marker-ruler"), _("Cue Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); - ruler_loop_punch_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-loop-punch-ruler"), _("Loop/Punch Ranges"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); - ruler_bbt_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-bbt-ruler"), _("Bars:Beats"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); - ruler_samples_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-samples-ruler"), _("Samples"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); - ruler_timecode_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-timecode-ruler"), _("Timecode"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); ruler_minsec_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-minsec-ruler"), _("Mins:Secs"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); + ruler_timecode_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-timecode-ruler"), _("Timecode"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); + ruler_samples_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-samples-ruler"), _("Samples"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); + ruler_bbt_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-bbt-ruler"), _("Bars:Beats"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); + ruler_meter_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-meter-ruler"), _("Time Signature"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); + ruler_tempo_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-tempo-ruler"), _("Tempo"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); + ruler_range_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-range-ruler"), _("Range Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); + ruler_loop_punch_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-loop-punch-ruler"), _("Loop/Punch Ranges"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); + ruler_cd_marker_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-cd-marker-ruler"), _("CD Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); + ruler_marker_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-marker-ruler"), _("Location Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); + ruler_cue_marker_action = Glib::RefPtr::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-cue-marker-ruler"), _("Cue Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility))); ActionManager::register_action (editor_menu_actions, X_("VideoMonitorMenu"), _("Video Monitor")); @@ -729,17 +729,17 @@ Editor::register_actions () no_ruler_shown_update = true; - ruler_marker_action->set_active (true); + ruler_minsec_action->set_active (false); + ruler_timecode_action->set_active (true); + ruler_samples_action->set_active (false); + ruler_bbt_action->set_active (true); ruler_meter_action->set_active (true); ruler_tempo_action->set_active (true); ruler_range_action->set_active (true); ruler_loop_punch_action->set_active (true); - ruler_loop_punch_action->set_active (true); - ruler_bbt_action->set_active (true); ruler_cd_marker_action->set_active (true); + ruler_marker_action->set_active (true); ruler_cue_marker_action->set_active (true); - ruler_timecode_action->set_active (true); - ruler_minsec_action->set_active (false); ruler_video_action->set_active (false); xjadeo_proc_action->set_active (false); @@ -758,7 +758,6 @@ Editor::register_actions () xjadeo_letterbox_action->set_sensitive (false); xjadeo_zoom_100->set_sensitive (false); - ruler_samples_action->set_active (false); no_ruler_shown_update = false; /* REGION LIST */ diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc index 891cbee5ac..6b8d1fd47f 100644 --- a/gtk2_ardour/editor_rulers.cc +++ b/gtk2_ardour/editor_rulers.cc @@ -322,16 +322,16 @@ Editor::store_ruler_visibility () { XMLNode* node = new XMLNode(X_("RulerVisibility")); - node->set_property (X_("timecode"), ruler_timecode_action->get_active()); - node->set_property (X_("bbt"), ruler_bbt_action->get_active()); - node->set_property (X_("samples"), ruler_samples_action->get_active()); node->set_property (X_("minsec"), ruler_minsec_action->get_active()); - node->set_property (X_("tempo"), ruler_tempo_action->get_active()); + node->set_property (X_("timecode"), ruler_timecode_action->get_active()); + node->set_property (X_("samples"), ruler_samples_action->get_active()); + node->set_property (X_("bbt"), ruler_bbt_action->get_active()); node->set_property (X_("meter"), ruler_meter_action->get_active()); - node->set_property (X_("marker"), ruler_marker_action->get_active()); + node->set_property (X_("tempo"), ruler_tempo_action->get_active()); node->set_property (X_("rangemarker"), ruler_range_action->get_active()); node->set_property (X_("transportmarker"), ruler_loop_punch_action->get_active()); node->set_property (X_("cdmarker"), ruler_cd_marker_action->get_active()); + node->set_property (X_("marker"), ruler_marker_action->get_active()); node->set_property (X_("cuemarker"), ruler_cue_marker_action->get_active()); node->set_property (X_("videotl"), ruler_video_action->get_active());