first steps towards livetrax prefs editor

This commit is contained in:
Paul Davis 2024-04-17 20:49:54 -06:00
parent 253114f442
commit d028292748
13 changed files with 5418 additions and 5788 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,94 @@
/*
* Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net>
* Copyright (C) 2012-2017 Robin Gareus <robin@gareus.org>
* Copyright (C) 2012-2018 Paul Davis <paul@linuxaudiosystems.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __gtk_ardour_rc_option_editor_h__
#define __gtk_ardour_rc_option_editor_h__
#include "widgets/tabbable.h"
#include "option_editor.h"
#include "visibility_group.h"
#include "transport_masters_dialog.h"
/** @file rc_option_editor.h
* @brief Editing of options which are obtained from and written back to one of the .rc files.
*
* This is subclassed from OptionEditor. Simple options (e.g. boolean and simple choices)
* are expressed using subclasses of Option. More complex UI elements are represented
* using individual classes subclassed from OptionEditorBox.
*/
/** Editor for options which are obtained from and written back to one of the .rc files. */
class RCOptionEditor : public OptionEditorContainer, public ARDOUR::SessionHandlePtr, public ArdourWidgets::Tabbable
{
public:
RCOptionEditor ();
void set_session (ARDOUR::Session*);
Gtk::Window* use_own_window (bool and_fill_it);
XMLNode& get_state () const;
bool on_key_release_event (GdkEventKey*);
private:
void parameter_changed (std::string const &);
void ltc_generator_volume_changed ();
ARDOUR::RCConfiguration* _rc_config;
BoolOption* _solo_control_is_listen_control;
ComboOption<ARDOUR::ListenPosition>* _listen_position;
VisibilityGroup _mixer_strip_visibility;
BoolOption* _sync_framerate;
HSliderOption* _ltc_volume_slider;
Gtk::Adjustment* _ltc_volume_adjustment;
BoolOption* _ltc_send_continuously;
BoolOption* _plugin_prefer_inline;
BoolOption* _cairo_image_surface;
TransportMastersWidget _transport_masters_widget;
PBD::ScopedConnection parameter_change_connection;
PBD::ScopedConnection engine_started_connection;
void show_audio_setup ();
void show_transport_masters ();
void reset_clip_library_dir ();
EntryOption* mrl_option;
EntryOption* mru_option;
std::string get_default_lower_midi_note ();
bool set_default_lower_midi_note (std::string);
std::string get_default_upper_midi_note ();
bool set_default_upper_midi_note (std::string);
/* plugin actions */
void plugin_scan_refresh ();
void plugin_reset_stats ();
void clear_vst2_cache ();
void clear_vst2_blacklist ();
void clear_vst3_cache ();
void clear_vst3_blacklist ();
void clear_au_cache ();
void clear_au_blacklist ();
void edit_vst_path (std::string const&, std::string const&, sigc::slot<std::string>, sigc::slot<bool, std::string>);
};
#endif /* __gtk_ardour_rc_option_editor_h__ */

View File

@ -337,11 +337,13 @@ ARDOUR_UI::connect_transport_elements ()
error_alert_button.set_related_action(act);
error_alert_button.set_fallthrough_to_parent(true);
#ifndef LIVETRAX
editor_visibility_button.set_related_action (ActionManager::get_action (X_("Common"), X_("change-editor-visibility")));
mixer_visibility_button.set_related_action (ActionManager::get_action (X_("Common"), X_("change-mixer-visibility")));
prefs_visibility_button.set_related_action (ActionManager::get_action (X_("Common"), X_("change-preferences-visibility")));
recorder_visibility_button.set_related_action (ActionManager::get_action (X_("Common"), X_("change-recorder-visibility")));
trigger_page_visibility_button.set_related_action (ActionManager::get_action (X_("Common"), X_("change-trigger-visibility")));
#endif
act = ActionManager::get_action ("Transport", "ToggleAutoReturn");
auto_return_button.set_related_action (act);
@ -389,7 +391,9 @@ ARDOUR_UI::setup_transport ()
editor_visibility_button.signal_drag_failed().connect (sigc::bind (sigc::ptr_fun (drag_failed), editor));
mixer_visibility_button.signal_drag_failed().connect (sigc::bind (sigc::ptr_fun (drag_failed), mixer));
#ifndef LIVETRAX
prefs_visibility_button.signal_drag_failed().connect (sigc::bind (sigc::ptr_fun (drag_failed), rc_option_editor));
#endif
recorder_visibility_button.signal_drag_failed().connect (sigc::bind (sigc::ptr_fun (drag_failed), recorder));
trigger_page_visibility_button.signal_drag_failed().connect (sigc::bind (sigc::ptr_fun (drag_failed), trigger_page));
@ -484,9 +488,11 @@ ARDOUR_UI::setup_transport ()
string_compose (_("Left-Click to show the %1 window\n"
"Right-click to show more options"), mixer->name()));
#ifndef LIVETRAX
Gtkmm2ext::UI::instance()->set_tip (prefs_visibility_button,
string_compose (_("Left-Click to show the %1 window\n"
"Right-click to show more options"), rc_option_editor->name()));
#endif
Gtkmm2ext::UI::instance()->set_tip (recorder_visibility_button,
string_compose (_("Left-Click to show the %1 window\n"
@ -980,7 +986,11 @@ void
ARDOUR_UI::show_ui_prefs ()
{
if (rc_option_editor) {
#ifdef LIVETRAX
rc_option_editor->present();
#else
show_tabbable (rc_option_editor);
#endif
rc_option_editor->set_current_page (_("Appearance"));
}
}
@ -989,7 +999,11 @@ void
ARDOUR_UI::show_mixer_prefs ()
{
if (rc_option_editor) {
#ifdef LIVETRAX
rc_option_editor->present();
#else
show_tabbable (rc_option_editor);
#endif
rc_option_editor->set_current_page (_("Signal Flow"));
}
}
@ -998,7 +1012,11 @@ void
ARDOUR_UI::show_plugin_prefs ()
{
if (rc_option_editor) {
#ifdef LIVETRAX
rc_option_editor->present ();
#else
show_tabbable (rc_option_editor);
#endif
rc_option_editor->set_current_page (_("Plugins"));
}
}
@ -1011,7 +1029,11 @@ ARDOUR_UI::click_button_clicked (GdkEventButton* ev)
return false;
}
#ifdef LIVETRAX
rc_option_editor->present();
#else
show_tabbable (rc_option_editor);
#endif
rc_option_editor->set_current_page (_("Metronome"));
return true;
}

View File

@ -186,8 +186,10 @@ ARDOUR_UI::tab_window_root_drop (GtkNotebook* src,
tabbable = editor;
} else if (w == GTK_WIDGET(mixer->contents().gobj())) {
tabbable = mixer;
#ifndef LIVETRAX
} else if (w == GTK_WIDGET(rc_option_editor->contents().gobj())) {
tabbable = rc_option_editor;
#endif
} else if (w == GTK_WIDGET(recorder->contents().gobj())) {
tabbable = recorder;
} else if (w == GTK_WIDGET(trigger_page->contents().gobj())) {
@ -272,9 +274,10 @@ ARDOUR_UI::setup_windows ()
_tabs.signal_page_added().connect (sigc::mem_fun (*this, &ARDOUR_UI::tabs_page_added));
_tabs.signal_page_removed().connect (sigc::mem_fun (*this, &ARDOUR_UI::tabs_page_removed));
rc_option_editor = new RCOptionEditor;
#ifndef LIVETRAX
rc_option_editor->StateChange.connect (sigc::mem_fun (*this, &ARDOUR_UI::tabbable_state_change));
#endif
if (create_editor ()) {
error << _("UI: cannot setup editor") << endmsg;
@ -308,7 +311,9 @@ ARDOUR_UI::setup_windows ()
/* order of addition affects order seen in initial window display */
#ifndef LIVETRAX
rc_option_editor->add_to_notebook (_tabs);
#endif
mixer->add_to_notebook (_tabs);
editor->add_to_notebook (_tabs);
recorder->add_to_notebook (_tabs);
@ -385,6 +390,8 @@ ARDOUR_UI::livetrax_setup_windows ()
using namespace Menu_Helpers;
using namespace Gtk;
rc_option_editor = new RCOptionEditor;
ArdourButton::set_default_tweaks (ArdourButton::Tweaks (ArdourButton::ForceBoxy|ArdourButton::ForceFlat));
if (create_editor()) {
@ -611,8 +618,10 @@ ARDOUR_UI::apply_window_settings (bool with_size)
if (mixer && current_tab == "mixer") {
_tabs.set_current_page (_tabs.page_num (mixer->contents()));
#ifndef LIVETRAX
} else if (rc_option_editor && current_tab == "preferences") {
_tabs.set_current_page (_tabs.page_num (rc_option_editor->contents()));
#endif
} else if (recorder && current_tab == "recorder") {
_tabs.set_current_page (_tabs.page_num (recorder->contents()));
} else if (trigger_page && current_tab == "trigger") {

View File

@ -496,10 +496,11 @@ ARDOUR_UI::step_up_through_tabs ()
candidates.push_back (trigger_page);
}
#ifndef LIVETRAX
if (rc_option_editor->tabbed()) {
candidates.push_back (rc_option_editor);
}
#endif
if (candidates.size() < 2) {
/* nothing to be done with zero or one visible in tabs */
return;
@ -545,10 +546,11 @@ ARDOUR_UI::step_down_through_tabs ()
candidates.push_back (trigger_page);
}
#ifndef LIVETRAX
if (rc_option_editor->tabbed()) {
candidates.push_back (rc_option_editor);
}
#endif
if (candidates.size() < 2) {
/* nothing to be done with zero or one visible in tabs */
return;
@ -675,10 +677,12 @@ ARDOUR_UI::tabs_page_added (Widget*,guint)
Pango::FontDescription ("Sans 24"),
0, 0,
Gdk::Color ("red")));
#ifndef LIVETRAX
prefs_visibility_button.drag_source_set_icon (Gtkmm2ext::pixbuf_from_string (rc_option_editor->name(),
Pango::FontDescription ("Sans 24"),
0, 0,
Gdk::Color ("red")));
#endif
recorder_visibility_button.drag_source_set_icon (Gtkmm2ext::pixbuf_from_string (recorder->name(),
Pango::FontDescription ("Sans 24"),
0, 0,
@ -713,9 +717,11 @@ ARDOUR_UI::tabs_switch (GtkNotebookPage*, guint page)
mixer_visibility_button.set_active_state (Gtkmm2ext::Off);
}
#ifndef LIVETRAX
if (rc_option_editor && (rc_option_editor->tabbed() || rc_option_editor->tabbed_by_default())) {
prefs_visibility_button.set_active_state (Gtkmm2ext::Off);
}
#endif
if (recorder && (recorder->tabbed() || recorder->tabbed_by_default())) {
recorder_visibility_button.set_active_state (Gtkmm2ext::Off);
@ -733,9 +739,11 @@ ARDOUR_UI::tabs_switch (GtkNotebookPage*, guint page)
mixer_visibility_button.set_active_state (Gtkmm2ext::ImplicitActive);
#ifndef LIVETRAX
if (rc_option_editor && (rc_option_editor->tabbed() || rc_option_editor->tabbed_by_default())) {
prefs_visibility_button.set_active_state (Gtkmm2ext::Off);
}
#endif
if (recorder && (recorder->tabbed() || recorder->tabbed_by_default())) {
recorder_visibility_button.set_active_state (Gtkmm2ext::Off);
@ -745,6 +753,7 @@ ARDOUR_UI::tabs_switch (GtkNotebookPage*, guint page)
trigger_page_visibility_button.set_active_state (Gtkmm2ext::Off);
}
#ifndef LIVETRAX
} else if (page == (guint) _tabs.page_num (rc_option_editor->contents())) {
if (editor && (editor->tabbed() || editor->tabbed_by_default())) {
@ -764,7 +773,7 @@ ARDOUR_UI::tabs_switch (GtkNotebookPage*, guint page)
if (trigger_page && (trigger_page->tabbed() || trigger_page->tabbed_by_default())) {
trigger_page_visibility_button.set_active_state (Gtkmm2ext::Off);
}
#endif
} else if (page == (guint) _tabs.page_num (recorder->contents())) {
if (editor && (editor->tabbed() || editor->tabbed_by_default())) {
@ -775,9 +784,11 @@ ARDOUR_UI::tabs_switch (GtkNotebookPage*, guint page)
mixer_visibility_button.set_active_state (Gtkmm2ext::Off);
}
#ifndef LIVETRAX
if (rc_option_editor && (rc_option_editor->tabbed() || rc_option_editor->tabbed_by_default())) {
prefs_visibility_button.set_active_state (Gtkmm2ext::Off);
}
#endif
recorder_visibility_button.set_active_state (Gtkmm2ext::ImplicitActive);
@ -795,9 +806,11 @@ ARDOUR_UI::tabs_switch (GtkNotebookPage*, guint page)
mixer_visibility_button.set_active_state (Gtkmm2ext::Off);
}
#ifndef LIVETRAX
if (rc_option_editor && (rc_option_editor->tabbed() || rc_option_editor->tabbed_by_default())) {
prefs_visibility_button.set_active_state (Gtkmm2ext::Off);
}
#endif
if (recorder && (recorder->tabbed() || recorder->tabbed_by_default())) {
recorder_visibility_button.set_active_state (Gtkmm2ext::Off);
@ -891,8 +904,10 @@ ARDOUR_UI::tabbable_state_change (Tabbable& t)
vis_button = &editor_visibility_button;
} else if (&t == mixer) {
vis_button = &mixer_visibility_button;
#ifndef LIVETRAX
} else if (&t == rc_option_editor) {
vis_button = &prefs_visibility_button;
#endif
} else if (&t == recorder) {
vis_button = &recorder_visibility_button;
} else if (&t == trigger_page) {

View File

@ -714,29 +714,37 @@ ARDOUR_UI::install_dependent_actions ()
/* XXX */
#ifdef LIVETRAX
ActionManager::register_action (common_actions, X_("menu-show-preferences"), _("Preferences"), sigc::mem_fun (*this, &ARDOUR_UI::show_mixer_prefs));
ActionManager::register_action (common_actions, X_("show-preferences"), _("Preferences"), sigc::mem_fun (*this, &ARDOUR_UI::show_mixer_prefs));
ActionManager::register_action (common_actions, X_("hide-preferences"), _("Hide"), sigc::mem_fun (*rc_option_editor, &Gtk::Widget::hide));
#else
ActionManager::register_action (common_actions, X_("menu-show-preferences"), _("Preferences"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), rc_option_editor));
ActionManager::register_action (common_actions, X_("show-preferences"), _("Show"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), rc_option_editor));
ActionManager::register_action (common_actions, X_("hide-preferences"), _("Hide"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::hide_tabbable), rc_option_editor));
ActionManager::register_action (common_actions, X_("attach-preferences"), _("Attach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::attach_tabbable), rc_option_editor));
ActionManager::register_action (common_actions, X_("detach-preferences"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), rc_option_editor));
ActionManager::register_action (common_actions, X_("change-preferences-visibility"), _("Change"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::button_change_tabbable_visibility), rc_option_editor));
ActionManager::register_action (common_actions, X_("key-change-preferences-visibility"), _("Change"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::key_change_tabbable_visibility), rc_option_editor));
#endif
ActionManager::register_action (common_actions, X_("hide-editor"), _("Hide"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::hide_tabbable), editor));
ActionManager::register_action (common_actions, X_("hide-mixer"), _("Hide"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::hide_tabbable), mixer));
ActionManager::register_action (common_actions, X_("hide-preferences"), _("Hide"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::hide_tabbable), rc_option_editor));
ActionManager::register_action (common_actions, X_("hide-recorder"), _("Hide"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::hide_tabbable), recorder));
ActionManager::register_action (common_actions, X_("hide-trigger"), _("Hide"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::hide_tabbable), trigger_page));
ActionManager::register_action (common_actions, X_("attach-editor"), _("Attach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::attach_tabbable), editor));
ActionManager::register_action (common_actions, X_("attach-mixer"), _("Attach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::attach_tabbable), mixer));
ActionManager::register_action (common_actions, X_("attach-preferences"), _("Attach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::attach_tabbable), rc_option_editor));
ActionManager::register_action (common_actions, X_("attach-recorder"), _("Attach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::attach_tabbable), recorder));
ActionManager::register_action (common_actions, X_("attach-trigger"), _("Attach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::attach_tabbable), trigger_page));
ActionManager::register_action (common_actions, X_("detach-editor"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), editor));
ActionManager::register_action (common_actions, X_("detach-mixer"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), mixer));
ActionManager::register_action (common_actions, X_("detach-preferences"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), rc_option_editor));
ActionManager::register_action (common_actions, X_("detach-recorder"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), recorder));
ActionManager::register_action (common_actions, X_("detach-trigger"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), trigger_page));
ActionManager::register_action (common_actions, X_("show-editor"), _("Show Editor"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), editor));
ActionManager::register_action (common_actions, X_("show-mixer"), _("Show Mixer"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), mixer));
ActionManager::register_action (common_actions, X_("show-preferences"), _("Show"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), rc_option_editor));
ActionManager::register_action (common_actions, X_("show-recorder"), _("Show Recorder"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), recorder));
ActionManager::register_action (common_actions, X_("show-trigger"), _("Show Cues"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), trigger_page));
@ -746,7 +754,6 @@ ARDOUR_UI::install_dependent_actions ()
*/
ActionManager::register_action (common_actions, X_("change-editor-visibility"), _("Change"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::button_change_tabbable_visibility), editor));
ActionManager::register_action (common_actions, X_("change-mixer-visibility"), _("Change"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::button_change_tabbable_visibility), mixer));
ActionManager::register_action (common_actions, X_("change-preferences-visibility"), _("Change"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::button_change_tabbable_visibility), rc_option_editor));
ActionManager::register_action (common_actions, X_("change-recorder-visibility"), _("Change"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::button_change_tabbable_visibility), recorder));
ActionManager::register_action (common_actions, X_("change-trigger-visibility"), _("Change"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::button_change_tabbable_visibility), trigger_page));
@ -756,7 +763,6 @@ ARDOUR_UI::install_dependent_actions ()
*/
ActionManager::register_action (common_actions, X_("key-change-editor-visibility"), _("Change"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::key_change_tabbable_visibility), editor));
ActionManager::register_action (common_actions, X_("key-change-mixer-visibility"), _("Change"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::key_change_tabbable_visibility), mixer));
ActionManager::register_action (common_actions, X_("key-change-preferences-visibility"), _("Change"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::key_change_tabbable_visibility), rc_option_editor));
ActionManager::register_action (common_actions, X_("key-change-recorder-visibility"), _("Change"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::key_change_tabbable_visibility), recorder));
ActionManager::register_action (common_actions, X_("key-change-trigger-visibility"), _("Change"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::key_change_tabbable_visibility), trigger_page));
@ -970,8 +976,10 @@ ARDOUR_UI::save_ardour_state ()
current_tab = "recorder";
} else if (current_page_number == _tabs.page_num (trigger_page->contents())) {
current_tab = "trigger";
#ifndef LIVETRAX
} else if (current_page_number == _tabs.page_num (rc_option_editor->contents())) {
current_tab = "preferences";
#endif
}
main_window_node.set_property (X_("current-tab"), current_tab);

View File

@ -247,7 +247,11 @@ Editor::snap_mode_button_clicked (GdkEventButton* ev)
RCOptionEditor* rc_option_editor = ARDOUR_UI::instance()->get_rc_option_editor();
if (rc_option_editor) {
#ifdef LIVETRAX
rc_option_editor->present ();
#else
ARDOUR_UI::instance()->show_tabbable (rc_option_editor);
#endif
rc_option_editor->set_current_page (_("Editor/Snap"));
}

View File

@ -78,7 +78,7 @@
#include "meter_patterns.h"
#include "midi_tracer.h"
#include "plugin_scan_dialog.h"
#include "rc_option_editor.h"
#include "livetrax_rc_option_editor.h"
#include "sfdb_ui.h"
#include "transport_masters_dialog.h"
#include "ui_config.h"
@ -2357,19 +2357,28 @@ MidiPortOptions::pretty_name_edit (std::string const & path, string const & new_
AudioEngine::instance()->set_port_pretty_name ((*iter)[midi_port_columns.fullname], new_text);
}
RCOptionEditor::RCOptionEditor ()
: OptionEditorContainer (Config)
/* pack self-as-vbox into tabbable */
, Tabbable (*this, _("Preferences"), X_("preferences"), /* detached by default */ false)
: OptionEditorWindow (Config, _("Preferences"))
, _rc_config (Config)
, _mixer_strip_visibility ("mixer-element-visibility")
, _cairo_image_surface (0)
, audiomidi_tab_button (_("Audio\nSystem\nSettings"))
, midi_tab_button (_("MIDI\nSystem\nSettings"))
, session_tab_button (_("Session\nSettings"))
, preferences_tab_button (_("Preferences"))
, sync_tab_button (_("Sync"))
{
UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &RCOptionEditor::parameter_changed));
BoolOption* bo;
button_box().pack_start (audiomidi_tab_button, true, true);
button_box().pack_start (midi_tab_button, true, true);
button_box().pack_start (session_tab_button, true, true);
button_box().pack_start (preferences_tab_button, true, true);
button_box().pack_start (sync_tab_button, true, true);
button_box().set_homogeneous (true);
button_box().show_all ();
/* GENERAL *****************************************************************/
add_option (_("General"), new OptionEditorHeading (_("Audio/MIDI Setup")));
@ -3950,369 +3959,6 @@ These settings will only take effect after %1 is restarted.\n\
Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(),
_("<b>When enabled</b> plugins will be reset at transport stop. When disabled plugins will be left unchanged at transport stop.\n\nThis mostly affects plugins with a \"tail\" like Reverbs."));
/* PLUGINS ******************************************************************/
#if (defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT || defined MACVST_SUPPORT || defined AUDIOUNIT_SUPPORT || defined VST3_SUPPORT)
add_option (_("Plugins"), new OptionEditorHeading (_("Scan/Discover")));
add_option (_("Plugins"),
new RcActionButton (_("Scan for Plugins"),
sigc::mem_fun (*this, &RCOptionEditor::plugin_scan_refresh)));
add_option (_("Plugins"), new PluginScanTimeOutSliderOption (_rc_config));
#endif
add_option (_("Plugins"), new OptionEditorHeading (_("General")));
#if (defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT || defined MACVST_SUPPORT || defined AUDIOUNIT_SUPPORT || defined VST3_SUPPORT)
bo = new BoolOption (
"discover-plugins-on-start",
_("Scan for [new] Plugins on Application Start"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_discover_plugins_on_start),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_discover_plugins_on_start)
);
add_option (_("Plugins"), bo);
Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(),
_("<b>When enabled</b> new plugins are searched, tested and added to the cache index on application start. When disabled new plugins will only be available after triggering a 'Scan' manually"));
bo = new BoolOption (
"show-plugin-scan-window",
_("Always Display Plugin Scan Progress"),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_plugin_scan_window),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_plugin_scan_window)
);
add_option (_("Plugins"), bo);
Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(),
_("<b>When enabled</b> a popup window showing plugin scan progress is displayed for indexing (cache load) and discovery (detect new plugins)"));
bo = new BoolOption (
"verbose-plugin-scan",
_("Verbose Plugin Scan"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_verbose_plugin_scan),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_verbose_plugin_scan)
);
add_option (_("Plugins"), bo);
Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(),
_("<b>When enabled</b> additional information for every plugin is shown to the Plugin Manager Log."));
#endif
bo = new BoolOption (
"show-manager-if-plugins-are-missing",
_("Open Plugin Manager window when missing plugins are found"),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_manager_if_plugins_are_missing),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_manager_if_plugins_are_missing)
);
add_option (_("Plugins"), bo);
Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(),
_("<b>When enabled</b> the Plugin Manager is display at session load if the session contains any plugins that are missing, or plugins have been updated and require a rescan."));
bo = new BoolOption (
"new-plugins-active",
_("Make new plugins active"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_new_plugins_active),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_new_plugins_active)
);
add_option (_("Plugins"), bo);
Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(),
_("<b>When enabled</b> plugins will be activated when they are added to tracks/busses.\n<b>When disabled</b> plugins will be left inactive when they are added to tracks/busses"));
bo = new BoolOption (
"setup-sidechain",
_("Setup Sidechain ports when loading plugin with aux inputs"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_setup_sidechain),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_setup_sidechain)
);
add_option (_("Plugins"), bo);
Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(),
_("<b>When enabled</b> sidechain ports are created for plugins at instantiation time if a plugin has sidechain inputs. Note that the ports themselves will have to be manually connected, so while the plugin pins are connected they are initially fed with silence.\n<b>When disabled</b> sidechain input pins will remain unconnected."));
add_option (_("Plugins/GUI"), new OptionEditorHeading (_("Plugin GUI")));
add_option (_("Plugins/GUI"),
new BoolOption (
"open-gui-after-adding-plugin",
_("Automatically open the plugin GUI when adding a new plugin"),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_open_gui_after_adding_plugin),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_open_gui_after_adding_plugin)
));
bo = new BoolOption (
"one-plugin-window-only",
_("Show only one plugin window at a time"),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_one_plugin_window_only),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_one_plugin_window_only)
);
add_option (_("Plugins/GUI"), bo);
Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(),
_("<b>When enabled</b> at most one plugin GUI window can be on-screen at a time. <b>When disabled</b>, the number of visible plugin GUI windows is unlimited"));
ComboOption<PluginGUIBehavior>* puimode = new ComboOption<PluginGUIBehavior> (
"plugin-gui-behavior",
_("Closing a Plugin GUI Window"),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_plugin_gui_behavior),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_plugin_gui_behavior)
);
puimode->add (PluginGUIHide, _("only hides the window"));
puimode->add (PluginGUIDestroyAny, _("destroys the GUI instance, releasing resources"));
puimode->add (PluginGUIDestroyVST, _("only destroys VST2/3 UIs, hides others"));
add_option (_("Plugins/GUI"), puimode);
Gtkmm2ext::UI::instance()->set_tip (puimode->tip_widget(), _("Closing a plugin window, usually only hides it. This makes is fast to open the same plugin UI again at a later time.\n\nMost plugin UIs are inactive and do not consume any CPU resources while they are not mapped on the screen.\n\nHowever some plugins do consume significant CPU and GPU resources even when they are not currently displayed. This option allows one to work around the issue."));
#ifdef LV2_EXTENDED
add_option (_("Plugins/GUI"), new OptionEditorHeading (_("Mixer Strip Inline Display")));
add_option (_("Plugins/GUI"),
new BoolOption (
"show-inline-display-by-default",
_("Show Plugin Inline Display on Mixer Strip by default"),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_inline_display_by_default),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_inline_display_by_default)
));
_plugin_prefer_inline = new BoolOption (
"prefer-inline-over-gui",
_("Don't automatically open the plugin GUI when the plugin has an inline display mode"),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_prefer_inline_over_gui),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_prefer_inline_over_gui)
);
add_option (_("Plugins/GUI"), _plugin_prefer_inline);
#endif
#if (defined WINDOWS_VST_SUPPORT || defined MACVST_SUPPORT || defined LXVST_SUPPORT || defined VST3_SUPPORT)
add_option (_("Plugins/VST"), new OptionEditorHeading (_("VST")));
#if 0
add_option (_("Plugins/VST"),
new RcActionButton (_("Scan for Plugins"),
sigc::mem_fun (*this, &RCOptionEditor::plugin_scan_refresh)));
#endif
#if (defined AUDIOUNIT_SUPPORT && defined MACVST_SUPPORT)
bo = new BoolOption (
"use-macvst",
_("Enable Mac VST2 support (requires restart or re-scan)"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_use_macvst),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_use_macvst)
);
add_option (_("Plugins/VST"), bo);
#endif
#ifndef MIXBUS
#ifdef WINDOWS_VST_SUPPORT
bo = new BoolOption (
"use-windows-vst",
_("Enable Windows VST2 support (requires restart or re-scan)"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_use_windows_vst),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_use_windows_vst)
);
add_option (_("Plugins/VST"), bo);
#endif
#ifdef LXVST_SUPPORT
bo = new BoolOption (
"use-lxvst",
_("Enable Linux VST2 support (requires restart or re-scan)"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_use_lxvst),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_use_lxvst)
);
add_option (_("Plugins/VST"), bo);
#endif
#ifdef VST3_SUPPORT
bo = new BoolOption (
"use-vst3",
_("Enable VST3 support (requires restart or re-scan)"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_use_vst3),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_use_vst3)
);
add_option (_("Plugins/VST"), bo);
#endif
#endif // !Mixbus
#if (defined WINDOWS_VST_SUPPORT || defined MACVST_SUPPORT || defined LXVST_SUPPORT)
add_option (_("Plugins/VST"), new OptionEditorHeading (_("VST 2.x")));
add_option (_("Plugins/VST"),
new RcActionButton (_("Clear"),
sigc::mem_fun (*this, &RCOptionEditor::clear_vst2_cache),
_("VST 2 Cache:")));
add_option (_("Plugins/VST"),
new RcActionButton (_("Clear"),
sigc::mem_fun (*this, &RCOptionEditor::clear_vst2_blacklist),
_("VST 2 Ignorelist:")));
#endif
#ifdef LXVST_SUPPORT
add_option (_("Plugins/VST"),
new RcActionButton (_("Edit"),
sigc::bind (sigc::mem_fun (*this, &RCOptionEditor::edit_vst_path),
_("Set Linux VST2 Search Path"),
PluginManager::instance().get_default_lxvst_path (),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_plugin_path_lxvst),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_plugin_path_lxvst)
),
_("Linux VST2 Path:")));
add_option (_("Plugins/VST"),
new RcConfigDisplay (
"plugin-path-lxvst",
_("Path:"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_plugin_path_lxvst),
0));
#endif
#ifdef WINDOWS_VST_SUPPORT
add_option (_("Plugins/VST"),
new RcActionButton (_("Edit"),
sigc::bind (sigc::mem_fun (*this, &RCOptionEditor::edit_vst_path),
_("Set Windows VST2 Search Path"),
PluginManager::instance().get_default_windows_vst_path (),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_plugin_path_vst),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_plugin_path_vst)
),
_("Windows VST2 Path:")));
add_option (_("Plugins/VST"),
new RcConfigDisplay (
"plugin-path-vst",
_("Path:"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_plugin_path_vst),
';'));
#endif
#ifdef VST3_SUPPORT
add_option (_("Plugins/VST"), new OptionEditorHeading (_("VST 3")));
add_option (_("Plugins/VST"),
new RcActionButton (_("Clear"),
sigc::mem_fun (*this, &RCOptionEditor::clear_vst3_cache),
_("VST 3 Cache:")));
add_option (_("Plugins/VST"),
new RcActionButton (_("Clear"),
sigc::mem_fun (*this, &RCOptionEditor::clear_vst3_blacklist),
_("VST 3 Ignorelist:")));
RcActionButton* vst3_path =
new RcActionButton (_("Edit"),
sigc::bind (sigc::mem_fun (*this, &RCOptionEditor::edit_vst_path),
_("Set Additional VST3 Search Path"),
"", /* default is blank */
sigc::mem_fun (*_rc_config, &RCConfiguration::get_plugin_path_vst3),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_plugin_path_vst3)
),
_("Additional VST3 Path:"));
vst3_path->set_note (_("Customizing VST3 paths is discouraged. Note that default VST3 paths as per "
"<a href=\"https://steinbergmedia.github.io/vst3_dev_portal/pages/Technical+Documentation/Locations+Format/Plugin+Locations.html\">specification</a> "
"are always searched, and need not be explicitly set."));
add_option (_("Plugins/VST"), vst3_path);
// -> Appearance/Mixer ?
add_option (_("Plugins/VST"),
new BoolOption (
"show-vst3-micro-edit-inline",
_("Automatically show 'Micro Edit' tagged controls on the mixer-strip"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_show_vst3_micro_edit_inline),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_vst3_micro_edit_inline)
));
#if (defined WINDOWS_VST_SUPPORT || defined MACVST_SUPPORT || defined LXVST_SUPPORT)
add_option (_("Plugins/VST"), new OptionEditorHeading (_("VST2/VST3")));
add_option (_("Plugins/VST"),
new BoolOption (
"conceal-vst2-if-vst3-exists",
_("Conceal VST2 Plugin if matching VST3 exists"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_conceal_vst2_if_vst3_exists),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_conceal_vst2_if_vst3_exists)
));
#endif
#endif // VST3
#endif // Any VST (2 or 3)
#ifdef AUDIOUNIT_SUPPORT
add_option (_("Plugins/Audio Unit"), new OptionEditorHeading (_("Audio Unit")));
#if 0
add_option (_("Plugins/Audio Unit"),
new RcActionButton (_("Scan for Plugins"),
sigc::mem_fun (*this, &RCOptionEditor::plugin_scan_refresh)));
#endif
bo = new BoolOption (
"use-audio-units",
_("Enable Audio Unit support (requires restart or re-scan)"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_use_audio_units),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_use_audio_units)
);
add_option (_("Plugins/Audio Unit"), bo);
add_option (_("Plugins/Audio Unit"),
new RcActionButton (_("Clear"),
sigc::mem_fun (*this, &RCOptionEditor::clear_au_cache),
_("AU Cache:")));
add_option (_("Plugins/Audio Unit"),
new RcActionButton (_("Clear"),
sigc::mem_fun (*this, &RCOptionEditor::clear_au_blacklist),
_("AU Ignorelist:")));
#endif
add_option (_("Plugins"), new OptionEditorHeading (_("LV1/LV2")));
add_option (_("Plugins"),
new BoolOption (
"conceal-lv1-if-lv2-exists",
_("Conceal LADSPA (LV1) Plugins if matching LV2 exists"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_conceal_lv1_if_lv2_exists),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_conceal_lv1_if_lv2_exists)
));
add_option (_("Plugins"), new OptionEditorHeading (_("Instrument")));
bo = new BoolOption (
"ask-replace-instrument",
_("Ask to replace existing instrument plugin"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_ask_replace_instrument),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_ask_replace_instrument)
);
add_option (_("Plugins"), bo);
bo = new BoolOption (
"ask-setup_instrument",
_("Interactively configure instrument plugins on insert"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_ask_setup_instrument),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_ask_setup_instrument)
);
add_option (_("Plugins"), bo);
Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(),
_("<b>When enabled</b> show a dialog to select instrument channel configuration before adding a multichannel plugin."));
add_option (_("Plugins"), new OptionEditorHeading (_("Statistics")));
add_option (_("Plugins"),
new RcActionButton (_("Reset Statistics"),
sigc::mem_fun (*this, &RCOptionEditor::plugin_reset_stats)));
add_option (_("Plugins"),
new SpinOption<int32_t> (
"max-plugin-chart",
_("Plugin chart (use-count) length"),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_max_plugin_chart),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_max_plugin_chart),
10, 25, 1, 5
));
add_option (_("Plugins"),
new SpinOption<int32_t> (
"max-plugin-recent",
_("Plugin recent list length"),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_max_plugin_recent),
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_max_plugin_recent),
10, 50, 1, 5
));
add_option (_("Plugins"), new OptionEditorBlank ());
/* MONITORING, SOLO) ********************************************************/
add_option (_("Monitoring"), new OptionEditorHeading (_("Monitoring")));
@ -5000,20 +4646,10 @@ These settings will only take effect after %1 is restarted.\n\
parameter_changed ("use-opengl-view");
#endif
XMLNode* node = ARDOUR_UI::instance()->preferences_settings();
if (node) {
/* gcc4 complains about ambiguity with Gtk::Widget::set_state
(Gtk::StateType) here !!!
*/
Tabbable::set_state (*node, Stateful::loading_state_version);
}
// XMLNode* node = ARDOUR_UI::instance()->preferences_settings();
set_current_page (_("General"));
/* Place the search entry */
treeview_packer.pack_end (search_packer, false, false);
/* Connect metadata */
for (auto p : pages()) {
@ -5034,7 +4670,7 @@ RCOptionEditor::on_key_release_event (GdkEventKey* event)
{
if (Keyboard::modifier_state_equals (event->state, Keyboard::close_window_modifier)) {
if (event->keyval == (guint) Keyboard::close_window_key) {
WindowProxy::hide ();
hide ();
return true;
}
}
@ -5045,7 +4681,7 @@ RCOptionEditor::on_key_release_event (GdkEventKey* event)
void
RCOptionEditor::set_session (Session *s)
{
SessionHandlePtr::set_session (s);
ArdourWindow::set_session (s);
_transport_masters_widget.set_session (s);
}
@ -5073,14 +4709,6 @@ RCOptionEditor::parameter_changed (string const & p)
bool const s = Config->get_send_ltc ();
_ltc_send_continuously->set_sensitive (s);
_ltc_volume_slider->set_sensitive (s);
} else if (p == "open-gui-after-adding-plugin" || p == "show-inline-display-by-default") {
#ifdef LV2_EXTENDED
_plugin_prefer_inline->set_sensitive (UIConfiguration::instance().get_open_gui_after_adding_plugin() && UIConfiguration::instance().get_show_inline_display_by_default());
#endif
} else if (p == "conceal-lv1-if-lv2-exists") {
plugin_scan_refresh ();
} else if (p == "conceal-vst2-if-vst3-exists") {
plugin_scan_refresh ();
}
}
@ -5099,83 +4727,10 @@ void RCOptionEditor::show_transport_masters () {
tact->set_active();
}
void RCOptionEditor::plugin_scan_refresh () {
/* first argument says discover new plugins, second means be verbose */
PluginScanDialog psd (false, true, current_toplevel ());
psd.start ();
ARDOUR_UI::instance()->show_plugin_manager ();
}
void RCOptionEditor::plugin_reset_stats () {
PluginManager::instance().reset_stats();
}
void RCOptionEditor::clear_vst2_cache () {
PluginManager::instance().clear_vst_cache();
}
void RCOptionEditor::clear_vst2_blacklist () {
PluginManager::instance().clear_vst_blacklist();
}
void RCOptionEditor::clear_vst3_cache () {
PluginManager::instance().clear_vst3_cache();
}
void RCOptionEditor::clear_vst3_blacklist () {
PluginManager::instance().clear_vst3_blacklist();
}
void RCOptionEditor::clear_au_cache () {
PluginManager::instance().clear_au_cache();
}
void RCOptionEditor::clear_au_blacklist () {
PluginManager::instance().clear_au_blacklist();
}
void
RCOptionEditor::edit_vst_path (std::string const& title, std::string const& dflt, sigc::slot<string> get, sigc::slot<bool, string> set)
{
/* see also PluginManagerUI::edit_vst_path */
PathsDialog pd (*current_toplevel(), title, get (), dflt);
if (pd.run () != Gtk::RESPONSE_ACCEPT) {
return;
}
pd.hide();
set (pd.get_serialized_paths());
MessageDialog msg (_("Re-scan Plugins now?"), false, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_YES_NO, true);
msg.set_default_response (Gtk::RESPONSE_YES);
if (msg.run() != Gtk::RESPONSE_YES) {
return;
}
msg.hide ();
plugin_scan_refresh ();
}
Gtk::Window*
RCOptionEditor::use_own_window (bool and_fill_it)
{
bool new_window = !own_window ();
Gtk::Window* win = Tabbable::use_own_window (and_fill_it);
if (win && new_window) {
win->set_name ("PreferencesWindow");
ARDOUR_UI::instance()->setup_toplevel_window (*win, _("Preferences"), this);
win->resize (1, 1);
win->set_resizable (false);
}
return win;
}
XMLNode&
RCOptionEditor::get_state () const
{
XMLNode* node = new XMLNode (X_("Preferences"));
node->add_child_nocopy (Tabbable::get_state());
return *node;
}

View File

@ -36,14 +36,13 @@
*/
/** Editor for options which are obtained from and written back to one of the .rc files. */
class RCOptionEditor : public OptionEditorContainer, public ARDOUR::SessionHandlePtr, public ArdourWidgets::Tabbable
class RCOptionEditor : public OptionEditorWindow
{
public:
RCOptionEditor ();
void set_session (ARDOUR::Session*);
Gtk::Window* use_own_window (bool and_fill_it);
XMLNode& get_state () const;
bool on_key_release_event (GdkEventKey*);
@ -63,6 +62,12 @@ private:
BoolOption* _cairo_image_surface;
TransportMastersWidget _transport_masters_widget;
Gtk::Button audiomidi_tab_button;
Gtk::Button midi_tab_button;
Gtk::Button session_tab_button;
Gtk::Button preferences_tab_button;
Gtk::Button sync_tab_button;
PBD::ScopedConnection parameter_change_connection;
PBD::ScopedConnection engine_started_connection;

File diff suppressed because it is too large Load Diff

View File

@ -1,94 +1,6 @@
/*
* Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net>
* Copyright (C) 2012-2017 Robin Gareus <robin@gareus.org>
* Copyright (C) 2012-2018 Paul Davis <paul@linuxaudiosystems.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __gtk_ardour_rc_option_editor_h__
#define __gtk_ardour_rc_option_editor_h__
#include "widgets/tabbable.h"
#include "option_editor.h"
#include "visibility_group.h"
#include "transport_masters_dialog.h"
/** @file rc_option_editor.h
* @brief Editing of options which are obtained from and written back to one of the .rc files.
*
* This is subclassed from OptionEditor. Simple options (e.g. boolean and simple choices)
* are expressed using subclasses of Option. More complex UI elements are represented
* using individual classes subclassed from OptionEditorBox.
*/
/** Editor for options which are obtained from and written back to one of the .rc files. */
class RCOptionEditor : public OptionEditorContainer, public ARDOUR::SessionHandlePtr, public ArdourWidgets::Tabbable
{
public:
RCOptionEditor ();
void set_session (ARDOUR::Session*);
Gtk::Window* use_own_window (bool and_fill_it);
XMLNode& get_state () const;
bool on_key_release_event (GdkEventKey*);
private:
void parameter_changed (std::string const &);
void ltc_generator_volume_changed ();
ARDOUR::RCConfiguration* _rc_config;
BoolOption* _solo_control_is_listen_control;
ComboOption<ARDOUR::ListenPosition>* _listen_position;
VisibilityGroup _mixer_strip_visibility;
BoolOption* _sync_framerate;
HSliderOption* _ltc_volume_slider;
Gtk::Adjustment* _ltc_volume_adjustment;
BoolOption* _ltc_send_continuously;
BoolOption* _plugin_prefer_inline;
BoolOption* _cairo_image_surface;
TransportMastersWidget _transport_masters_widget;
PBD::ScopedConnection parameter_change_connection;
PBD::ScopedConnection engine_started_connection;
void show_audio_setup ();
void show_transport_masters ();
void reset_clip_library_dir ();
EntryOption* mrl_option;
EntryOption* mru_option;
std::string get_default_lower_midi_note ();
bool set_default_lower_midi_note (std::string);
std::string get_default_upper_midi_note ();
bool set_default_upper_midi_note (std::string);
/* plugin actions */
void plugin_scan_refresh ();
void plugin_reset_stats ();
void clear_vst2_cache ();
void clear_vst2_blacklist ();
void clear_vst3_cache ();
void clear_vst3_blacklist ();
void clear_au_cache ();
void clear_au_blacklist ();
void edit_vst_path (std::string const&, std::string const&, sigc::slot<std::string>, sigc::slot<bool, std::string>);
};
#endif /* __gtk_ardour_rc_option_editor_h__ */
#ifdef LIVETRAX
#include "livetrax_rc_option_editor.h"
#else
#include "ardour_rc_option_editor.h"
#endif

View File

@ -239,6 +239,7 @@ gtk2_ardour_sources = [
'pt_import_selector.cc',
'public_editor.cc',
'quantize_dialog.cc',
'rc_option_editor.cc',
'rec_info_box.cc',
'recorder_group_tabs.cc',
'recorder_ui.cc',
@ -614,11 +615,6 @@ def build(bld):
obj.target = 'ardour-' + bld.env['VERSION']
obj.includes = ['.']
if Options.options.program_name == "Livetrax":
obj.source += [ 'livetrax_rc_option_editor.cc' ]
else:
obj.source += [ 'rc_option_editor.cc' ]
if bld.is_defined('WINDOWS_VST_SUPPORT'):
obj.includes += [ '../libs/fst' ]

View File

@ -814,6 +814,10 @@ int main() { return 0; }''',
conf.define('MIXBUS32C', 1)
compiler_flags.append ('-DMIXBUS32C')
if Options.options.program_name.lower() == "livetrax":
compiler_flags.append ('-DLIVETRAX')
conf.define ('LIVETRAX', 1)
compiler_flags.append ('-DPROGRAM_NAME="' + Options.options.program_name + '"')
compiler_flags.append ('-DPROGRAM_VERSION="' + PROGRAM_VERSION + '"')