From 97791de333fed9672ddbb1853fb81dc56806e053 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Tue, 24 Sep 2024 14:18:08 -0500 Subject: [PATCH] Transfer from ardour_ui (punch, rec-mode and labels) --- gtk2_ardour/application_bar.cc | 239 +++++++++++++++++++++++++++++-- gtk2_ardour/application_bar.h | 25 +++- gtk2_ardour/ardour_ui.cc | 12 -- gtk2_ardour/ardour_ui.h | 14 -- gtk2_ardour/ardour_ui2.cc | 150 ------------------- gtk2_ardour/ardour_ui_dialogs.cc | 2 - gtk2_ardour/ardour_ui_options.cc | 33 +---- 7 files changed, 250 insertions(+), 225 deletions(-) diff --git a/gtk2_ardour/application_bar.cc b/gtk2_ardour/application_bar.cc index b799a76b92..4e1a4f20b0 100644 --- a/gtk2_ardour/application_bar.cc +++ b/gtk2_ardour/application_bar.cc @@ -48,6 +48,7 @@ #include "gtkmm2ext/application.h" #include "gtkmm2ext/bindings.h" #include "gtkmm2ext/gtk_ui.h" +#include "gtkmm2ext/menu_elems.h" #include "gtkmm2ext/utils.h" #include "gtkmm2ext/window_title.h" @@ -99,8 +100,9 @@ using namespace Gtkmm2ext; using namespace ArdourWidgets; using namespace Gtk; using namespace std; +using namespace Gtk::Menu_Helpers; -static const gchar *_record_mode_strings[] = { +static const gchar *_record_mode_strings_[] = { N_("Layered"), N_("Non-Layered"), N_("Snd on Snd"), @@ -113,6 +115,7 @@ ApplicationBar::ApplicationBar () : _have_layout (false) , _basic_ui (0) { + _record_mode_strings = I18N (_record_mode_strings_); } ApplicationBar::~ApplicationBar () @@ -142,6 +145,22 @@ ApplicationBar::on_parent_changed (Gtk::Widget*) ssbox->pack_start (*_shuttle_box.vari_button(), false, false, 0); ssbox->pack_start (*_shuttle_box.info_button(), false, false, 0); + _punch_label.set_text (_("Punch:")); + _layered_label.set_text (_("Rec:")); + + _punch_in_button.set_text (S_("Punch|In")); + _punch_out_button.set_text (S_("Punch|Out")); + + _record_mode_selector.AddMenuElem (MenuElem (_record_mode_strings[(int)RecLayered], sigc::bind (sigc::mem_fun (*this, &ApplicationBar::set_record_mode), RecLayered))); + _record_mode_selector.AddMenuElem (MenuElem (_record_mode_strings[(int)RecNonLayered], sigc::bind (sigc::mem_fun (*this, &ApplicationBar::set_record_mode), RecNonLayered))); + _record_mode_selector.AddMenuElem (MenuElem (_record_mode_strings[(int)RecSoundOnSound], sigc::bind (sigc::mem_fun (*this, &ApplicationBar::set_record_mode), RecSoundOnSound))); + _record_mode_selector.set_sizing_texts (_record_mode_strings); + + act = ActionManager::get_action ("Transport", "TogglePunchIn"); + _punch_in_button.set_related_action (act); + act = ActionManager::get_action ("Transport", "TogglePunchOut"); + _punch_out_button.set_related_action (act); + int vpadding = 1; int hpadding = 2; int col = 0; @@ -151,27 +170,164 @@ ApplicationBar::on_parent_changed (Gtk::Widget*) _table.attach (*ssbox, TCOL, 1, 2 , FILL, SHRINK, 0, 0); ++col; + _table.attach (*(manage (new ArdourVSpacer ())), TCOL, 0, 2 , SHRINK, EXPAND|FILL, 3, 0); + ++col; + _table.attach (_punch_label, TCOL, 0, 1 , FILL, SHRINK, 3, 0); + _table.attach (_layered_label, TCOL, 1, 2 , FILL, SHRINK, 3, 0); + ++col; + + _table.attach (_punch_in_button, col, col + 1, 0, 1 , FILL, SHRINK, hpadding, vpadding); + _table.attach (_punch_space, col + 1, col + 2, 0, 1 , FILL, SHRINK, 0, vpadding); + _table.attach (_punch_out_button, col + 2, col + 3, 0, 1 , FILL, SHRINK, hpadding, vpadding); + _table.attach (_record_mode_selector, col, col + 3, 1, 2 , FILL, SHRINK, hpadding, vpadding); + col += 3; _table.set_spacings (0); _table.set_row_spacings (4); _table.set_border_width (1); - _table.show_all(); //TODO: update visibility somewhere else - pack_start(_table, false, false); + + _table.show_all (); // TODO: update visibility somewhere else + pack_start (_table, false, false); /*sizing */ Glib::RefPtr button_height_size_group = ARDOUR_UI::instance()->button_height_size_group; button_height_size_group->add_widget (_transport_ctrl.size_button ()); button_height_size_group->add_widget (_sync_button); + button_height_size_group->add_widget (_punch_in_button); + button_height_size_group->add_widget (_punch_out_button); + button_height_size_group->add_widget (_record_mode_selector); + + Glib::RefPtr punch_button_size_group = SizeGroup::create (Gtk::SIZE_GROUP_HORIZONTAL); + punch_button_size_group->add_widget (_punch_in_button); + punch_button_size_group->add_widget (_punch_out_button); + + /* tooltips */ + Gtkmm2ext::UI::instance()->set_tip (_punch_in_button, _("Start recording at auto-punch start")); + Gtkmm2ext::UI::instance()->set_tip (_punch_out_button, _("Stop recording at auto-punch end")); + Gtkmm2ext::UI::instance()->set_tip (_record_mode_selector, _("Layered, new recordings will be added as regions on a layer atop existing regions.\nSoundOnSound, behaves like Layered, except underlying regions will be audible.\nNon Layered, the underlying region will be spliced and replaced with the newly recorded region.")); /* theming */ _sync_button.set_name ("transport active option button"); + _punch_in_button.set_name ("punch button"); + _punch_out_button.set_name ("punch button"); + _record_mode_selector.set_name ("record mode button"); + /* initialize */ set_transport_sensitivity (false); + + if (_session) { + repack_transport_hbox (); + } } #undef PX_SCALE #undef TCOL + +void +ApplicationBar::repack_transport_hbox () +{ + if (!_have_layout) { + return; + } + +/* if (time_info_box) { + if (time_info_box->get_parent()) { + transport_hbox.remove (*time_info_box); + } + if (UIConfiguration::instance().get_show_toolbar_selclock ()) { + transport_hbox.pack_start (*time_info_box, false, false); + time_info_box->show(); + } + } + + if (mini_timeline.get_parent()) { + transport_hbox.remove (mini_timeline); + } + if (UIConfiguration::instance().get_show_mini_timeline ()) { + transport_hbox.pack_start (mini_timeline, true, true); + mini_timeline.show(); + } + + if (editor_meter) { + if (editor_meter_table.get_parent()) { + transport_hbox.remove (editor_meter_table); + } + if (meterbox_spacer.get_parent()) { + transport_hbox.remove (meterbox_spacer); + transport_hbox.remove (meterbox_spacer2); + } + + if (UIConfiguration::instance().get_show_editor_meter()) { + transport_hbox.pack_end (meterbox_spacer, false, false, 3); + transport_hbox.pack_end (editor_meter_table, false, false); + transport_hbox.pack_end (meterbox_spacer2, false, false, 1); + meterbox_spacer2.set_size_request (1, -1); + editor_meter_table.show(); + meterbox_spacer.show(); + meterbox_spacer2.show(); + } + } +*/ + bool show_rec = UIConfiguration::instance().get_show_toolbar_recpunch (); + if (show_rec) { + _punch_label.show (); + _layered_label.show (); + _punch_in_button.show (); + _punch_out_button.show (); + _record_mode_selector.show (); +// _recpunch_spacer.show (); + } else { + _punch_label.hide (); + _layered_label.hide (); + _punch_in_button.hide (); + _punch_out_button.hide (); + _record_mode_selector.hide (); +// _recpunch_spacer.hide (); + } + +/* + bool show_pdc = UIConfiguration::instance().get_show_toolbar_latency (); + if (show_pdc) { + latency_disable_button.show (); + route_latency_value.show (); + io_latency_label.show (); + io_latency_value.show (); + latency_spacer.show (); + } else { + latency_disable_button.hide (); + route_latency_value.hide (); + io_latency_label.hide (); + io_latency_value.hide (); + latency_spacer.hide (); + } + + bool show_cue = UIConfiguration::instance().get_show_toolbar_cuectrl (); + if (show_cue) { + _cue_rec_enable.show (); + _cue_play_enable.show (); + cuectrl_spacer.show (); + } else { + _cue_rec_enable.hide (); + _cue_play_enable.hide (); + cuectrl_spacer.hide (); + } + + bool show_mnfo = UIConfiguration::instance().get_show_toolbar_monitor_info (); + if (show_mnfo) { + monitor_dim_button.show (); + monitor_mono_button.show (); + monitor_mute_button.show (); + monitor_spacer.show (); + } else { + monitor_dim_button.hide (); + monitor_mono_button.hide (); + monitor_mute_button.hide (); + monitor_spacer.hide (); + } +*/ +} + void ApplicationBar::set_session (Session *s) { @@ -196,6 +352,11 @@ ApplicationBar::set_session (Session *s) _session->AuditionActive.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ApplicationBar::auditioning_changed, this, _1), gui_context()); _session->TransportStateChange.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ApplicationBar::map_transport_state, this), gui_context()); + _session->config.ParameterChanged.connect (_session_connections, MISSING_INVALIDATOR, std::bind (&ApplicationBar::parameter_changed, this, _1), gui_context()); + + //initialize all session config settings + std::function pc (std::bind (&ApplicationBar::parameter_changed, this, _1)); + _session->config.map_parameters (pc); _blink_connection = Timers::blink_connect (sigc::mem_fun(*this, &ApplicationBar::blink_handler)); } @@ -230,12 +391,10 @@ void ApplicationBar::parameter_changed (std::string p) { if (p == "external-sync") { - if (!_session->config.get_external_sync()) { _sync_button.set_text (S_("SyncSource|Int.")); } else { } - } else if (p == "sync-source") { if (_session) { if (!_session->config.get_external_sync()) { @@ -252,6 +411,57 @@ ApplicationBar::parameter_changed (std::string p) } else { UI::instance()->set_tip (_sync_button, _("External sync is not possible: video pull up/down is set")); } + } else if (p == "primary-clock-delta-mode") { +// primary_clock->set_display_delta_mode(UIConfiguration::instance().get_primary_clock_delta_mode()); + } else if (p == "secondary-clock-delta-mode") { +// secondary_clock->set_display_delta_mode(UIConfiguration::instance().get_secondary_clock_delta_mode()); + } else if (p == "show-mini-timeline") { + repack_transport_hbox (); + } else if (p == "show-dsp-load-info") { + repack_transport_hbox (); + } else if (p == "show-disk-space-info") { + repack_transport_hbox (); + } else if (p == "show-toolbar-recpunch") { + repack_transport_hbox (); + } else if (p == "show-toolbar-monitoring") { + repack_transport_hbox (); + } else if (p == "show-toolbar-selclock") { + repack_transport_hbox (); + } else if (p == "show-toolbar-latency") { + repack_transport_hbox (); + } else if (p == "show-toolbar-cuectrl") { + repack_transport_hbox (); + } else if (p == "show-toolbar-monitor-info") { + repack_transport_hbox (); + } else if (p == "show-editor-meter") { + repack_transport_hbox (); + } else if (p == "show-secondary-clock") { +// update_clock_visibility (); + } else if (p == "action-table-columns") { +/* const uint32_t cols = UIConfiguration::instance().get_action_table_columns (); + for (int i = 0; i < MAX_LUA_ACTION_BUTTONS; ++i) { + const int col = i / 2; + if (cols & (1<config.get_cue_behavior()); +// _cue_play_enable.set_active (cb & ARDOUR::FollowCues); + } else if (p == "record-mode") { + size_t m = _session->config.get_record_mode (); + assert (m < _record_mode_strings.size ()); + _record_mode_selector.set_active (_record_mode_strings[m]); + } else if (p == "no-strobe") { +// stop_clocking (); +// start_clocking (); } } @@ -269,6 +479,14 @@ ApplicationBar::sync_button_clicked (GdkEventButton* ev) return true; } +void +ApplicationBar::set_record_mode (RecordMode m) +{ + if (_session) { + _session->config.set_record_mode (m); + } +} + void ApplicationBar::sync_blink (bool onoff) { @@ -313,19 +531,18 @@ ApplicationBar::map_transport_state () { _shuttle_box.map_transport_state (); -/* if (!_session) { - record_mode_selector.set_sensitive (false); + if (!_session) { + _record_mode_selector.set_sensitive (false); return; } float sp = _session->transport_speed(); if (sp != 0.0f) { - record_mode_selector.set_sensitive (!_session->actively_recording ()); + _record_mode_selector.set_sensitive (!_session->actively_recording ()); } else { - record_mode_selector.set_sensitive (true); - update_disk_space (); + _record_mode_selector.set_sensitive (true); +// update_disk_space (); } -*/ } diff --git a/gtk2_ardour/application_bar.h b/gtk2_ardour/application_bar.h index cc3148339b..fd5bc7468b 100644 --- a/gtk2_ardour/application_bar.h +++ b/gtk2_ardour/application_bar.h @@ -62,24 +62,37 @@ private: void on_parent_changed (Gtk::Widget*); bool sync_button_clicked (GdkEventButton*); + void parameter_changed (std::string); + void repack_transport_hbox (); + void map_transport_state (); void set_transport_sensitivity (bool); void auditioning_changed (bool); void _auditioning_changed (bool); + void set_record_mode (ARDOUR::RecordMode); + /* blinking alerts */ void sync_blink (bool); void blink_handler (bool); - bool _have_layout; - BasicUI* _basic_ui; - Gtk::Table _table; - TransportControlUI _transport_ctrl; - ShuttleControl _shuttle_box; - ArdourWidgets::ArdourButton _sync_button; + bool _have_layout; + BasicUI* _basic_ui; + Gtk::Table _table; + TransportControlUI _transport_ctrl; + ShuttleControl _shuttle_box; + ArdourWidgets::ArdourButton _sync_button; + Gtk::Label _punch_label; + Gtk::Label _layered_label; + Gtk::Label _punch_space; + ArdourWidgets::ArdourButton _punch_in_button; + ArdourWidgets::ArdourButton _punch_out_button; + ArdourWidgets::ArdourDropdown _record_mode_selector; + + std::vector _record_mode_strings; sigc::connection _blink_connection; }; diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 842f011a2f..a2972562ca 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -207,13 +207,6 @@ ARDOUR_UI *ARDOUR_UI::theArdourUI = 0; sigc::signal ARDOUR_UI::Clock; sigc::signal ARDOUR_UI::CloseAllDialogs; -static const gchar *_record_mode_strings[] = { - N_("Layered"), - N_("Non-Layered"), - N_("Snd on Snd"), - 0 -}; - static bool ask_about_configuration_copy (string const & old_dir, string const & new_dir, int version) { @@ -372,8 +365,6 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir) UIConfiguration::instance().post_gui_init (); - record_mode_strings = I18N (_record_mode_strings); - if (ARDOUR::handle_old_configuration_files (std::bind (ask_about_configuration_copy, _1, _2, _3))) { { @@ -2161,7 +2152,6 @@ void ARDOUR_UI::map_transport_state () { if (!_session) { - record_mode_selector.set_sensitive (false); if (UIConfiguration::instance().get_screen_saver_mode () == InhibitWhileRecording) { inhibit_screensaver (false); } @@ -2171,9 +2161,7 @@ ARDOUR_UI::map_transport_state () float sp = _session->transport_speed(); if (sp != 0.0f) { - record_mode_selector.set_sensitive (!_session->actively_recording ()); } else { - record_mode_selector.set_sensitive (true); update_disk_space (); } if (UIConfiguration::instance().get_screen_saver_mode () == InhibitWhileRecording) { diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 94a7b02018..f661e8d482 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -522,7 +522,6 @@ private: Gtk::HBox transport_hbox; ArdourWidgets::ArdourVSpacer* secondary_clock_spacer; - void repack_transport_hbox (); void update_clock_visibility (); void toggle_follow_edits (); @@ -531,10 +530,6 @@ private: ApplicationBar *application_bar; - ArdourWidgets::ArdourButton punch_in_button; - ArdourWidgets::ArdourButton punch_out_button; - ArdourWidgets::ArdourDropdown record_mode_selector; - ArdourWidgets::ArdourVSpacer recpunch_spacer; ArdourWidgets::ArdourVSpacer latency_spacer; ArdourWidgets::ArdourVSpacer monitor_spacer; @@ -545,11 +540,6 @@ private: ArdourWidgets::ArdourButton monitor_mono_button; ArdourWidgets::ArdourButton monitor_mute_button; - Gtk::Label punch_label; - Gtk::Label layered_label; - - Gtk::Label punch_space; - void toggle_external_sync (); void toggle_time_master (); void toggle_video_sync (); @@ -610,8 +600,6 @@ private: void audition_alert_clicked (); bool error_alert_press (GdkEventButton *); - void set_record_mode (ARDOUR::RecordMode); - void big_clock_value_changed (); void primary_clock_value_changed (); void secondary_clock_value_changed (); @@ -835,8 +823,6 @@ private: void editor_realized (); - std::vector record_mode_strings; - void toggle_use_mmc (); void toggle_send_mmc (); void toggle_send_mtc (); diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc index 83880af382..b48670423e 100644 --- a/gtk2_ardour/ardour_ui2.cc +++ b/gtk2_ardour/ardour_ui2.cc @@ -92,7 +92,6 @@ ARDOUR_UI::setup_tooltips () ArdourCanvas::Canvas::set_tooltip_timeout (Gtk::Settings::get_default()->property_gtk_tooltip_timeout ()); set_tip (auto_return_button, _("Return to last playback start when stopped")); - set_tip (record_mode_selector, _("Layered, new recordings will be added as regions on a layer atop existing regions.\nSoundOnSound, behaves like Layered, except underlying regions will be audible.\nNon Layered, the underlying region will be spliced and replaced with the newly recorded region.")); set_tip (follow_edits_button, _("Playhead follows Range tool clicks, and Range selections")); parameter_changed("click-gain"); set_tip (solo_alert_button, _("When active, something is soloed.\nClick to de-solo everything")); @@ -196,104 +195,6 @@ ARDOUR_UI::cue_rec_state_changed () //Config->get_cue_behavior() } -void -ARDOUR_UI::repack_transport_hbox () -{ - if (time_info_box) { - if (time_info_box->get_parent()) { - transport_hbox.remove (*time_info_box); - } - if (UIConfiguration::instance().get_show_toolbar_selclock ()) { - transport_hbox.pack_start (*time_info_box, false, false); - time_info_box->show(); - } - } - - if (mini_timeline.get_parent()) { - transport_hbox.remove (mini_timeline); - } - if (UIConfiguration::instance().get_show_mini_timeline ()) { - transport_hbox.pack_start (mini_timeline, true, true); - mini_timeline.show(); - } - - if (editor_meter) { - if (editor_meter_table.get_parent()) { - transport_hbox.remove (editor_meter_table); - } - if (meterbox_spacer.get_parent()) { - transport_hbox.remove (meterbox_spacer); - transport_hbox.remove (meterbox_spacer2); - } - - if (UIConfiguration::instance().get_show_editor_meter()) { - transport_hbox.pack_end (meterbox_spacer, false, false, 3); - transport_hbox.pack_end (editor_meter_table, false, false); - transport_hbox.pack_end (meterbox_spacer2, false, false, 1); - meterbox_spacer2.set_size_request (1, -1); - editor_meter_table.show(); - meterbox_spacer.show(); - meterbox_spacer2.show(); - } - } - - bool show_rec = UIConfiguration::instance().get_show_toolbar_recpunch (); - if (show_rec) { - punch_label.show (); - layered_label.show (); - punch_in_button.show (); - punch_out_button.show (); - record_mode_selector.show (); - recpunch_spacer.show (); - } else { - punch_label.hide (); - layered_label.hide (); - punch_in_button.hide (); - punch_out_button.hide (); - record_mode_selector.hide (); - recpunch_spacer.hide (); - } - - bool show_pdc = UIConfiguration::instance().get_show_toolbar_latency (); - if (show_pdc) { - latency_disable_button.show (); - route_latency_value.show (); - io_latency_label.show (); - io_latency_value.show (); - latency_spacer.show (); - } else { - latency_disable_button.hide (); - route_latency_value.hide (); - io_latency_label.hide (); - io_latency_value.hide (); - latency_spacer.hide (); - } - - bool show_cue = UIConfiguration::instance().get_show_toolbar_cuectrl (); - if (show_cue) { - _cue_rec_enable.show (); - _cue_play_enable.show (); - cuectrl_spacer.show (); - } else { - _cue_rec_enable.hide (); - _cue_play_enable.hide (); - cuectrl_spacer.hide (); - } - - bool show_mnfo = UIConfiguration::instance().get_show_toolbar_monitor_info (); - if (show_mnfo) { - monitor_dim_button.show (); - monitor_mono_button.show (); - monitor_mute_button.show (); - monitor_spacer.show (); - } else { - monitor_dim_button.hide (); - monitor_mono_button.hide (); - monitor_mute_button.hide (); - monitor_spacer.hide (); - } -} - void ARDOUR_UI::update_clock_visibility () { @@ -343,11 +244,6 @@ ARDOUR_UI::setup_transport () act = ActionManager::get_action (X_("Transport"), X_("ToggleFollowEdits")); follow_edits_button.set_related_action (act); - act = ActionManager::get_action ("Transport", "TogglePunchIn"); - punch_in_button.set_related_action (act); - act = ActionManager::get_action ("Transport", "TogglePunchOut"); - punch_out_button.set_related_action (act); - act = ActionManager::get_action (X_("Monitor Section"), X_("monitor-dim-all")); monitor_dim_button.set_related_action (act); act = ActionManager::get_action (X_("Monitor Section"), X_("monitor-mono")); @@ -417,10 +313,6 @@ ARDOUR_UI::setup_transport () recorder_visibility_button.set_name (X_("page switch button")); trigger_page_visibility_button.set_name (X_("page switch button")); - punch_in_button.set_name ("punch button"); - punch_out_button.set_name ("punch button"); - record_mode_selector.set_name ("record mode button"); - latency_disable_button.set_name ("latency button"); monitor_dim_button.set_name ("monitor section dim"); @@ -438,13 +330,6 @@ ARDOUR_UI::setup_transport () /* and widget text */ auto_return_button.set_text(_("Auto Return")); follow_edits_button.set_text(_("Follow Range")); - punch_in_button.set_text (S_("Punch|In")); - punch_out_button.set_text (S_("Punch|Out")); - - record_mode_selector.AddMenuElem (MenuElem (record_mode_strings[(int)RecLayered], sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::set_record_mode), RecLayered))); - record_mode_selector.AddMenuElem (MenuElem (record_mode_strings[(int)RecNonLayered], sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::set_record_mode), RecNonLayered))); - record_mode_selector.AddMenuElem (MenuElem (record_mode_strings[(int)RecSoundOnSound], sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::set_record_mode), RecSoundOnSound))); - record_mode_selector.set_sizing_texts (record_mode_strings); latency_disable_button.set_text (_("Disable PDC")); io_latency_label.set_text (_("I/O Latency:")); @@ -453,9 +338,6 @@ ARDOUR_UI::setup_transport () monitor_mono_button.set_text (_("Mono")); monitor_mute_button.set_text (_("Mute All")); - punch_label.set_text (_("Punch:")); - layered_label.set_text (_("Rec:")); - /* and tooltips */ Gtkmm2ext::UI::instance()->set_tip (editor_visibility_button, @@ -478,8 +360,6 @@ ARDOUR_UI::setup_transport () string_compose (_("Left-Click to show the %1 window\n" "Right-click to show more options"), trigger_page->name())); - Gtkmm2ext::UI::instance()->set_tip (punch_in_button, _("Start recording at auto-punch start")); - Gtkmm2ext::UI::instance()->set_tip (punch_out_button, _("Stop recording at auto-punch end")); /* monitor section */ Gtkmm2ext::UI::instance()->set_tip (monitor_dim_button, _("Monitor section dim output")); @@ -488,10 +368,6 @@ ARDOUR_UI::setup_transport () /* transport control size-group */ - Glib::RefPtr punch_button_size_group = SizeGroup::create (Gtk::SIZE_GROUP_HORIZONTAL); - punch_button_size_group->add_widget (punch_in_button); - punch_button_size_group->add_widget (punch_out_button); - Glib::RefPtr monitor_button_size_group = SizeGroup::create (Gtk::SIZE_GROUP_HORIZONTAL); monitor_button_size_group->add_widget (monitor_dim_button); monitor_button_size_group->add_widget (monitor_mono_button); @@ -553,11 +429,6 @@ ARDOUR_UI::setup_transport () button_height_size_group->add_widget (mixer_visibility_button); button_height_size_group->add_widget (prefs_visibility_button); - //punch section - button_height_size_group->add_widget (punch_in_button); - button_height_size_group->add_widget (punch_out_button); - button_height_size_group->add_widget (record_mode_selector); - // PDC button_height_size_group->add_widget (latency_disable_button); @@ -582,19 +453,6 @@ ARDOUR_UI::setup_transport () transport_table.attach (*application_bar, TCOL, 0, 2 , EXPAND|FILL, EXPAND|FILL, 3, 0); ++col; - transport_table.attach (*(manage (new ArdourVSpacer ())), TCOL, 0, 2 , SHRINK, EXPAND|FILL, 3, 0); - ++col; - - transport_table.attach (punch_label, TCOL, 0, 1 , FILL, SHRINK, 3, 0); - transport_table.attach (layered_label, TCOL, 1, 2 , FILL, SHRINK, 3, 0); - ++col; - - transport_table.attach (punch_in_button, col, col + 1, 0, 1 , FILL, SHRINK, hpadding, vpadding); - transport_table.attach (punch_space, col + 1, col + 2, 0, 1 , FILL, SHRINK, 0, vpadding); - transport_table.attach (punch_out_button, col + 2, col + 3, 0, 1 , FILL, SHRINK, hpadding, vpadding); - transport_table.attach (record_mode_selector, col, col + 3, 1, 2 , FILL, SHRINK, hpadding, vpadding); - col += 3; - transport_table.attach (recpunch_spacer, TCOL, 0, 2 , SHRINK, EXPAND|FILL, 3, 0); ++col; @@ -683,7 +541,6 @@ ARDOUR_UI::setup_transport () latency_switch_changed (); session_latency_updated (true); - repack_transport_hbox (); update_clock_visibility (); /* desensitize */ @@ -786,13 +643,6 @@ ARDOUR_UI::error_alert_press (GdkEventButton* ev) return !do_toggle; } -void -ARDOUR_UI::set_record_mode (RecordMode m) -{ - if (_session) { - _session->config.set_record_mode (m); - } -} void ARDOUR_UI::solo_blink (bool onoff) diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index 83cec242a9..d158067fb2 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -288,8 +288,6 @@ ARDOUR_UI::set_session (Session *s) _clear_editor_meter = true; editor_meter_peak_display.signal_button_release_event().connect (sigc::mem_fun(*this, &ARDOUR_UI::editor_meter_peak_button_release), false); - - repack_transport_hbox (); } update_title (); diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc index 05b51cac21..50c2d49d11 100644 --- a/gtk2_ardour/ardour_ui_options.cc +++ b/gtk2_ardour/ardour_ui_options.cc @@ -338,6 +338,9 @@ ARDOUR_UI::parameter_changed (std::string p) } else if (p == "sync-source") { + synchronize_sync_source_and_video_pullup (); + set_fps_timeout_connection (); + } else if (p == "follow-edits") { ActionManager::map_some_state ("Transport", "ToggleFollowEdits", &UIConfiguration::get_follow_edits); @@ -378,10 +381,6 @@ ARDOUR_UI::parameter_changed (std::string p) ActionManager::map_some_state ("Transport", "ToggleClick", &RCConfiguration::get_clicking); } else if (p == "use-video-sync") { ActionManager::map_some_state ("Transport", "ToggleVideoSync", sigc::mem_fun (_session->config, &SessionConfiguration::get_use_video_sync)); - } else if (p == "sync-source") { - - synchronize_sync_source_and_video_pullup (); - set_fps_timeout_connection (); } else if (p == "show-track-meters") { if (editor) editor->toggle_meter_updating(); @@ -403,28 +402,6 @@ ARDOUR_UI::parameter_changed (std::string p) } } else if (p == "waveform-gradient-depth") { ArdourWaveView::WaveView::set_global_gradient_depth (UIConfiguration::instance().get_waveform_gradient_depth()); - } else if (p == "show-mini-timeline") { - repack_transport_hbox (); - } else if (p == "show-dsp-load-info") { - repack_transport_hbox (); - } else if (p == "show-disk-space-info") { - repack_transport_hbox (); - } else if (p == "show-toolbar-recpunch") { - repack_transport_hbox (); - } else if (p == "show-toolbar-monitoring") { - repack_transport_hbox (); - } else if (p == "show-toolbar-selclock") { - repack_transport_hbox (); - } else if (p == "show-toolbar-latency") { - repack_transport_hbox (); - } else if (p == "show-toolbar-cuectrl") { - repack_transport_hbox (); - } else if (p == "show-toolbar-monitor-info") { - repack_transport_hbox (); - } else if (p == "show-editor-meter") { - repack_transport_hbox (); - } else if (p == "show-secondary-clock") { - update_clock_visibility (); } else if (p == "waveform-scale") { ArdourWaveView::WaveView::set_global_logscaled (UIConfiguration::instance().get_waveform_scale() == Logarithmic); } else if (p == "widget-prelight") { @@ -457,10 +434,6 @@ ARDOUR_UI::parameter_changed (std::string p) } else if (p == "cue-behavior") { CueBehavior cb (_session->config.get_cue_behavior()); _cue_play_enable.set_active (cb & ARDOUR::FollowCues); - } else if (p == "record-mode") { - size_t m = _session->config.get_record_mode (); - assert (m < record_mode_strings.size ()); - record_mode_selector.set_active (record_mode_strings[m]); } else if (p == "flat-buttons") { bool flat = UIConfiguration::instance().get_flat_buttons(); if (ArdourButton::flat_buttons () != flat) {