diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 2a8caf5032..980a91d370 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -413,7 +413,6 @@ public: LiveTraxEditorVisible = 0x1, LiveTraxMixerVisible = 0x2, LiveTraxMeterVisible = 0x4, - LiveTraxPrefsVisible = 0x8, }; void livetrax_toggle_visibility (LiveTraxVisibility); @@ -653,7 +652,6 @@ private: Gtk::Table livetrax_top_table_r; Gtk::HBox livetrax_meter_bar; Gtk::HBox livetrax_editor_bar; - Gtk::HBox livetrax_prefs_bar; Gtk::HBox livetrax_mixer_bar; ArdourWidgets::ArdourDropShadow _livetrax_spacer1; diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc index 41442a3409..081efc395b 100644 --- a/gtk2_ardour/ardour_ui2.cc +++ b/gtk2_ardour/ardour_ui2.cc @@ -989,7 +989,9 @@ void ARDOUR_UI::show_ui_prefs () { if (rc_option_editor) { -#ifndef LIVETRAX +#ifdef LIVETRAX + rc_option_editor->present(); +#else show_tabbable (rc_option_editor); #endif rc_option_editor->set_current_page (_("Appearance")); @@ -1000,7 +1002,9 @@ void ARDOUR_UI::show_mixer_prefs () { if (rc_option_editor) { -#ifndef LIVETRAX +#ifdef LIVETRAX + rc_option_editor->present(); +#else show_tabbable (rc_option_editor); #endif rc_option_editor->set_current_page (_("Signal Flow")); @@ -1011,7 +1015,9 @@ void ARDOUR_UI::show_plugin_prefs () { if (rc_option_editor) { -#ifndef LIVETRAX +#ifdef LIVETRAX + rc_option_editor->present (); +#else show_tabbable (rc_option_editor); #endif rc_option_editor->set_current_page (_("Plugins")); @@ -1026,7 +1032,9 @@ ARDOUR_UI::click_button_clicked (GdkEventButton* ev) return false; } -#ifndef LIVETRAX +#ifdef LIVETRAX + rc_option_editor->present(); +#else show_tabbable (rc_option_editor); #endif rc_option_editor->set_current_page (_("Metronome")); diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index 08e27aaa60..5a7d01de6b 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -459,7 +459,7 @@ ARDOUR_UI::livetrax_setup_windows () livetrax_prefs_view_button = manage (new ArdourButton (_("PREFS"), ArdourButton::Element (ArdourButton::Text|ArdourButton::Body), true)); livetrax_prefs_view_button->set_icon (ArdourWidgets::ArdourIcon::Config); - act = ActionManager::get_action (X_("Common"), X_("livetrax-toggle-prefs")); + act = ActionManager::get_action (X_("Common"), X_("show-ui-prefs")); livetrax_prefs_view_button->set_related_action (act); livetrax_prefs_view_button->set_name ("page switch button"); @@ -579,10 +579,6 @@ ARDOUR_UI::livetrax_setup_windows () // livetrax_meter_bar.set_border_width (4); livetrax_meter_bar.pack_start (*livetrax_meters, true, true, 0); - hb = manage (new HBox); - hb->pack_start (rc_option_editor->contents(), true, true); - livetrax_prefs_bar.pack_start (*hb, true, true); - hb = manage (new HBox); livetrax_edit_vscrollbar = manage (new VScrollbar (editor->vertical_adjustment)); livetrax_edit_vscrollbar->show (); @@ -621,7 +617,6 @@ ARDOUR_UI::livetrax_setup_windows () main_vpacker.pack_start (livetrax_meter_bar, false, false); main_vpacker.pack_start (_livetrax_spacer2, false, false); main_vpacker.pack_start (livetrax_editor_bar, true, true); - main_vpacker.pack_start (livetrax_prefs_bar, true, false); main_vpacker.pack_start (_livetrax_spacer3, false, false); main_vpacker.pack_start (livetrax_mixer_bar, false, false); @@ -820,14 +815,6 @@ ARDOUR_UI::livetrax_visibility_change () livetrax_editor_view_button->set_active_state (Gtkmm2ext::Off); } - if (_livetrax_visibility & LiveTraxPrefsVisible) { - livetrax_prefs_bar.show (); - livetrax_prefs_view_button->set_active_state (Gtkmm2ext::ExplicitActive); - } else { - livetrax_prefs_bar.hide (); - livetrax_prefs_view_button->set_active_state (Gtkmm2ext::Off); - } - if (_livetrax_visibility & LiveTraxMixerVisible) { livetrax_mixer_bar.show (); _livetrax_spacer3.show(); @@ -852,14 +839,6 @@ ARDOUR_UI::livetrax_toggle_visibility (LiveTraxVisibility v) _livetrax_visibility = LiveTraxVisibility (LiveTraxEditorVisible); } - //enforce exclusivity between tracks and prefs - if (v==LiveTraxEditorVisible) { - _livetrax_visibility = LiveTraxVisibility (_livetrax_visibility & ~LiveTraxPrefsVisible); - } - if (v==LiveTraxPrefsVisible) { - _livetrax_visibility = LiveTraxVisibility (LiveTraxPrefsVisible); //ONLY show prefs - } - livetrax_visibility_change (); } diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index ac5d8e516e..87b1cd5393 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -297,10 +297,10 @@ ARDOUR_UI::install_actions () if (Profile->get_livetrax()) { /* XXX should these be toggles? */ + ActionManager::register_action (common_actions, X_("show-ui-prefs"), _("Show more UI preferences"), sigc::mem_fun (*this, &ARDOUR_UI::show_ui_prefs)); ActionManager::register_action (common_actions, X_("livetrax-toggle-meter"), _("Hide/Show Meters"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::livetrax_toggle_visibility), LiveTraxMeterVisible)); ActionManager::register_action (common_actions, X_("livetrax-toggle-mixer"), _("Hide/Show Mixer"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::livetrax_toggle_visibility), LiveTraxMixerVisible)); ActionManager::register_action (common_actions, X_("livetrax-toggle-editor"), _("Hide/Show Editor"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::livetrax_toggle_visibility), LiveTraxEditorVisible)); - ActionManager::register_action (common_actions, X_("livetrax-toggle-prefs"), _("Hide/Show Prefs"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::livetrax_toggle_visibility), LiveTraxPrefsVisible)); } ActionManager::register_action (common_actions, X_("toggle-meterbridge"), S_("Window|Meterbridge"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_meterbridge)); diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index 2a2d92596c..7d5eb14876 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -247,7 +247,9 @@ Editor::snap_mode_button_clicked (GdkEventButton* ev) RCOptionEditor* rc_option_editor = ARDOUR_UI::instance()->get_rc_option_editor(); if (rc_option_editor) { -#ifndef LIVETRAX +#ifdef LIVETRAX + rc_option_editor->present (); +#else ARDOUR_UI::instance()->show_tabbable (rc_option_editor); #endif rc_option_editor->set_current_page (_("Editor/Snap")); diff --git a/gtk2_ardour/livetrax_rc_option_editor.h b/gtk2_ardour/livetrax_rc_option_editor.h index 67a2dd822f..7951cada28 100644 --- a/gtk2_ardour/livetrax_rc_option_editor.h +++ b/gtk2_ardour/livetrax_rc_option_editor.h @@ -47,8 +47,6 @@ public: bool on_key_release_event (GdkEventKey*); - Gtk::Widget& contents() { return hpacker; } - private: void parameter_changed (std::string const &); void ltc_generator_volume_changed (); diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc index 205e9a6eeb..afe2fe0699 100644 --- a/gtk2_ardour/option_editor.cc +++ b/gtk2_ardour/option_editor.cc @@ -1233,7 +1233,5 @@ OptionEditorWindow::OptionEditorWindow (PBD::Configuration* c, string const& str hpacker.show_all (); vpacker.show (); -#ifndef LIVETRAX add (hpacker); -#endif }