X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Frc_option_editor.cc;h=97b81d8c1dff958ef41000a2c1fecf6cddb3a347;hb=cf52d6e4b40111eb04b244ec054055a4ec15dbe0;hp=2972274898960efcc742a9ab6ca8c2867cb2760f;hpb=089549acb67e9f11039853eb5af48b00d206b7a5;p=ardour.git diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 2972274898..97b81d8c1d 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -55,6 +55,7 @@ #include "ardour_window.h" #include "ardour_dialog.h" #include "ardour_ui.h" +#include "color_theme_manager.h" #include "gui_thread.h" #include "meter_patterns.h" #include "midi_tracer.h" @@ -65,7 +66,7 @@ #include "keyboard.h" #include "theme_manager.h" #include "ui_config.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace std; using namespace Gtk; @@ -111,7 +112,7 @@ public: sigc::mem_fun (*this, &ClickOptions::click_emphasis_browse_clicked)); t->attach (_click_emphasis_browse_button, 2, 3, 3, 4, FILL); - _box->pack_start (*t, false, false); + _box->pack_start (*t, true, false); _click_path_entry.signal_activate().connect (sigc::mem_fun (*this, &ClickOptions::click_changed)); _click_emphasis_path_entry.signal_activate().connect (sigc::mem_fun (*this, &ClickOptions::click_emphasis_changed)); @@ -1361,7 +1362,7 @@ public: edit_box->set_spacing(3); _box->pack_start (*edit_box, false, false); edit_box->show (); - + Label* label = manage (new Label); label->set_text (_("Click to edit the settings for selected protocol ( it must be ENABLED first ):")); edit_box->pack_start (*label, false, false); @@ -1431,7 +1432,7 @@ private: else edit_button->set_sensitive (false); } - + void view_changed (TreeModel::Path const &, TreeModel::iterator const & i) { TreeModel::Row r = *i; @@ -1853,6 +1854,13 @@ RCOptionEditor::RCOptionEditor () , _rc_config (Config) , _mixer_strip_visibility ("mixer-element-visibility") { + 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); + } UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &RCOptionEditor::parameter_changed)); @@ -1930,11 +1938,11 @@ RCOptionEditor::RCOptionEditor () 0, 1000, 1, 20 )); - add_option (_("Misc"), new OptionEditorHeading (_("Click"))); + add_option (_("Misc/Click"), new OptionEditorHeading (_("Click"))); - add_option (_("Misc"), new ClickOptions (_rc_config)); + add_option (_("Misc/Click"), new ClickOptions (_rc_config)); - add_option (_("Misc"), + add_option (_("Misc/Click"), new FaderOption ( "click-gain", _("Click gain level"), @@ -2336,11 +2344,11 @@ if (!Profile->get_mixbus()) { rsas->add(ExistingNewlyCreatedBoth, _("existing selection and newly-created regions")); add_option (_("Editor"), rsas); - - add_option (_("Editor"), new OptionEditorHeading (_("Waveforms"))); + + add_option (_("Editor/Waveforms"), new OptionEditorHeading (_("Waveforms"))); if (!Profile->get_mixbus()) { - add_option (_("Editor"), + add_option (_("Editor/Waveforms"), new BoolOption ( "show-waveforms", _("Show waveforms in regions"), @@ -2349,7 +2357,7 @@ if (!Profile->get_mixbus()) { )); } // !mixbus - add_option (_("Editor"), + add_option (_("Editor/Waveforms"), new BoolOption ( "show-waveforms-while-recording", _("Show waveforms for audio while it is being recorded"), @@ -2367,7 +2375,7 @@ if (!Profile->get_mixbus()) { wfs->add (Linear, _("linear")); wfs->add (Logarithmic, _("logarithmic")); - add_option (_("Editor"), wfs); + add_option (_("Editor/Waveforms"), wfs); ComboOption* wfsh = new ComboOption ( "waveform-shape", @@ -2379,9 +2387,9 @@ if (!Profile->get_mixbus()) { wfsh->add (Traditional, _("traditional")); wfsh->add (Rectified, _("rectified")); - add_option (_("Editor"), wfsh); + add_option (_("Editor/Waveforms"), wfsh); - add_option (_("Editor"), new ClipLevelOptions ()); + add_option (_("Editor/Waveforms"), new ClipLevelOptions ()); /* AUDIO */ @@ -2516,24 +2524,6 @@ if (!Profile->get_mixbus()) { add_option (_("Audio"), dm); - add_option (_("Audio"), new OptionEditorHeading (_("Plugins"))); - - add_option (_("Audio"), - new BoolOption ( - "plugins-stop-with-transport", - _("Silence plugins when the transport is stopped"), - sigc::mem_fun (*_rc_config, &RCConfiguration::get_plugins_stop_with_transport), - sigc::mem_fun (*_rc_config, &RCConfiguration::set_plugins_stop_with_transport) - )); - - add_option (_("Audio"), - 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 (_("Audio"), new OptionEditorHeading (_("Regions"))); add_option (_("Audio"), @@ -2732,9 +2722,9 @@ if (!ARDOUR::Profile->get_mixbus()) { sigc::mem_fun (*_rc_config, &RCConfiguration::set_midi_feedback) )); - add_option (_("MIDI"), new OptionEditorHeading (_("MIDI Clock"))); + add_option (_("MIDI/Sync"), new OptionEditorHeading (_("MIDI Clock"))); - add_option (_("MIDI"), + add_option (_("MIDI/Sync"), new BoolOption ( "send-midi-clock", _("Send MIDI Clock"), @@ -2742,9 +2732,9 @@ if (!ARDOUR::Profile->get_mixbus()) { sigc::mem_fun (*_rc_config, &RCConfiguration::set_send_midi_clock) )); - add_option (_("MIDI"), new OptionEditorHeading (_("MIDI Time Code (MTC)"))); + add_option (_("MIDI/Sync"), new OptionEditorHeading (_("MIDI Time Code (MTC)"))); - add_option (_("MIDI"), + add_option (_("MIDI/Sync"), new BoolOption ( "send-mtc", _("Send MIDI Time Code"), @@ -2752,7 +2742,7 @@ if (!ARDOUR::Profile->get_mixbus()) { sigc::mem_fun (*_rc_config, &RCConfiguration::set_send_mtc) )); - add_option (_("MIDI"), + add_option (_("MIDI/Sync"), new SpinOption ( "mtc-qf-speed-tolerance", _("Percentage either side of normal transport speed to transmit MTC"), @@ -2761,9 +2751,9 @@ if (!ARDOUR::Profile->get_mixbus()) { 0, 20, 1, 5 )); - add_option (_("MIDI"), new OptionEditorHeading (_("Midi Machine Control (MMC)"))); + add_option (_("MIDI/Sync"), new OptionEditorHeading (_("Midi Machine Control (MMC)"))); - add_option (_("MIDI"), + add_option (_("MIDI/Sync"), new BoolOption ( "mmc-control", _("Obey MIDI Machine Control commands"), @@ -2771,7 +2761,7 @@ if (!ARDOUR::Profile->get_mixbus()) { sigc::mem_fun (*_rc_config, &RCConfiguration::set_mmc_control) )); - add_option (_("MIDI"), + add_option (_("MIDI/Sync"), new BoolOption ( "send-mmc", _("Send MIDI Machine Control commands"), @@ -2779,7 +2769,7 @@ if (!ARDOUR::Profile->get_mixbus()) { sigc::mem_fun (*_rc_config, &RCConfiguration::set_send_mmc) )); - add_option (_("MIDI"), + add_option (_("MIDI/Sync"), new SpinOption ( "mmc-receive-device-id", _("Inbound MMC device ID"), @@ -2788,7 +2778,7 @@ if (!ARDOUR::Profile->get_mixbus()) { 0, 128, 1, 10 )); - add_option (_("MIDI"), + add_option (_("MIDI/Sync"), new SpinOption ( "mmc-send-device-id", _("Outbound MMC device ID"), @@ -2850,28 +2840,19 @@ if (!ARDOUR::Profile->get_mixbus()) { add_option (_("Control Surfaces"), new ControlSurfacesOptions); - ComboOption* rm = new ComboOption ( - "remote-model", - _("Control surface remote ID"), - sigc::mem_fun (*_rc_config, &RCConfiguration::get_remote_model), - sigc::mem_fun (*_rc_config, &RCConfiguration::set_remote_model) - ); - - rm->add (UserOrdered, _("assigned by user")); - rm->add (MixerOrdered, _("follows order of mixer")); - - add_option (_("Control Surfaces"), rm); - /* VIDEO Timeline */ add_option (_("Video"), new VideoTimelineOptions (_rc_config)); #if (defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT || defined AUDIOUNIT_SUPPORT) - add_option (_("Plugins"), new OptionEditorHeading (_("General"))); - add_option (_("Plugins"), new RcActionButton (_("Scan for Plugins"), sigc::mem_fun (*this, &RCOptionEditor::plugin_scan_refresh))); +#endif + + add_option (_("Plugins"), new OptionEditorHeading (_("General"))); + +#if (defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT || defined AUDIOUNIT_SUPPORT) bo = new BoolOption ( "show-plugin-scan-window", _("Always Display Plugin Scan Progress"), @@ -2881,11 +2862,30 @@ if (!ARDOUR::Profile->get_mixbus()) { add_option (_("Plugins"), bo); Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(), _("When enabled a popup window showing plugin scan progress is displayed for indexing (cache load) and discovery (detect new plugins)")); - #endif + bo = new BoolOption ( + "plugins-stop-with-transport", + _("Silence plugins when the transport is stopped"), + sigc::mem_fun (*_rc_config, &RCConfiguration::get_plugins_stop_with_transport), + sigc::mem_fun (*_rc_config, &RCConfiguration::set_plugins_stop_with_transport) + ); + add_option (_("Plugins"), bo); + Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(), + _("When enabled 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.")); + + 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(), + _("When enabled plugins will be activated when they are added to tracks/busses. When disabled plugins will be left inactive when they are added to tracks/busses")); + #if (defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT) - add_option (_("Plugins"), new OptionEditorHeading (_("VST"))); + add_option (_("Plugins/VST"), new OptionEditorHeading (_("VST"))); bo = new BoolOption ( "discover-vst-on-start", @@ -2893,7 +2893,7 @@ if (!ARDOUR::Profile->get_mixbus()) { sigc::mem_fun (*_rc_config, &RCConfiguration::get_discover_vst_on_start), sigc::mem_fun (*_rc_config, &RCConfiguration::set_discover_vst_on_start) ); - add_option (_("Plugins"), bo); + add_option (_("Plugins/VST"), bo); Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(), _("When enabled new VST 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")); @@ -2905,40 +2905,40 @@ if (!ARDOUR::Profile->get_mixbus()) { sigc::mem_fun (*_rc_config, &RCConfiguration::get_verbose_plugin_scan), sigc::mem_fun (*_rc_config, &RCConfiguration::set_verbose_plugin_scan) ); - add_option (_("Plugins"), bo); + add_option (_("Plugins/VST"), bo); Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(), _("When enabled additional information for every plugin is added to the Log Window.")); #endif - add_option (_("Plugins"), new VstTimeOutSliderOption (_rc_config)); + add_option (_("Plugins/VST"), new VstTimeOutSliderOption (_rc_config)); - add_option (_("Plugins"), + add_option (_("Plugins/VST"), new RcActionButton (_("Clear"), sigc::mem_fun (*this, &RCOptionEditor::clear_vst_cache), _("VST Cache:"))); - add_option (_("Plugins"), + add_option (_("Plugins/VST"), new RcActionButton (_("Clear"), sigc::mem_fun (*this, &RCOptionEditor::clear_vst_blacklist), _("VST Blacklist:"))); #endif #ifdef LXVST_SUPPORT - add_option (_("Plugins"), + add_option (_("Plugins/VST"), new RcActionButton (_("Edit"), sigc::mem_fun (*this, &RCOptionEditor::edit_lxvst_path), _("Linux VST Path:"))); - add_option (_("Plugins"), + 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"), + add_option (_("Plugins/VST"), new RcActionButton (_("Edit"), sigc::mem_fun (*this, &RCOptionEditor::edit_vst_path), _("Windows VST Path:"))); @@ -2951,7 +2951,7 @@ if (!ARDOUR::Profile->get_mixbus()) { #endif #ifdef AUDIOUNIT_SUPPORT - add_option (_("Plugins"), new OptionEditorHeading (_("Audio Unit"))); + add_option (_("Plugins/Audio Unit"), new OptionEditorHeading (_("Audio Unit"))); bo = new BoolOption ( "discover-audio-units", @@ -2963,12 +2963,12 @@ if (!ARDOUR::Profile->get_mixbus()) { Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(), _("When enabled Audio Unit Plugins are discovered on application start. When disabled AU plugins will only be available after triggering a 'Scan' manually. The first successful scan will enable AU auto-scan, Any crash during plugin discovery will disable it.")); - add_option (_("Plugins"), + add_option (_("Plugins/Audio Unit"), new RcActionButton (_("Clear"), sigc::mem_fun (*this, &RCOptionEditor::clear_au_cache), _("AU Cache:"))); - add_option (_("Plugins"), + add_option (_("Plugins/Audio Unit"), new RcActionButton (_("Clear"), sigc::mem_fun (*this, &RCOptionEditor::clear_au_blacklist), _("AU Blacklist:"))); @@ -2984,7 +2984,7 @@ if (!ARDOUR::Profile->get_mixbus()) { sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_open_gui_after_adding_plugin) )); -#ifdef LV2_SUPPORT +#if (defined LV2_SUPPORT && defined LV2_EXTENDED) add_option (_("Plugins"), new BoolOption ( "show-inline-display-by-default", @@ -3051,6 +3051,14 @@ if (!ARDOUR::Profile->get_mixbus()) { add_option (S_("Preferences|GUI"), bgo); #endif + add_option (S_("Preferences|GUI"), + new BoolOption ( + "use-wm-visibility", + _("Use Window Manager/Desktop visibility information"), + sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_use_wm_visibility), + sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_use_wm_visibility) + )); + add_option (S_("Preferences|GUI"), new BoolOption ( "widget-prelight", @@ -3340,10 +3348,13 @@ if (!ARDOUR::Profile->get_mixbus()) { ThemeManager* tm = manage (new ThemeManager); add_page (_("Theme"), *tm); + add_option (_("Theme/Colors"), new ColorThemeManager); + //trigger some parameter-changed messages which affect widget-visibility or -sensitivity parameter_changed ("send-ltc"); parameter_changed ("sync-source"); parameter_changed ("use-monitor-bus"); + parameter_changed ("open-gui-after-adding-plugin"); } void @@ -3478,3 +3489,11 @@ RCOptionEditor::use_own_window (bool and_fill_it) return win; } + +XMLNode& +RCOptionEditor::get_state () +{ + XMLNode* node = new XMLNode (X_("Preferences")); + node->add_child_nocopy (Tabbable::get_state()); + return *node; +}