enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h
[ardour.git] / gtk2_ardour / rc_option_editor.cc
index b2eaddfafbea80782ad83fdfe0c3ffaf0c6072c4..97b81d8c1dff958ef41000a2c1fecf6cddb3a347 100644 (file)
@@ -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));
@@ -374,7 +375,7 @@ public:
                  _insert_note_button_adjustment (3, 1, 5),
                  _insert_note_button_spin (_insert_note_button_adjustment)
        {
-               const Glib::ustring restart_msg = _("\nChanges to this setting will only persist after your project has been saved.");
+               const std::string restart_msg = _("\nChanges to this setting will only persist after your project has been saved.");
                /* internationalize and prepare for use with combos */
 
                vector<string> dumb;
@@ -667,9 +668,9 @@ public:
                set_popdown_strings (_snap_modifier_combo, dumb);
                _snap_modifier_combo.signal_changed().connect (sigc::mem_fun(*this, &KeyboardOptions::snap_modifier_chosen));
 #ifdef __APPLE__
-               Glib::ustring mod_str = string_compose (X_("%1-%2"), Keyboard::level4_modifier_name (), Keyboard::tertiary_modifier_name ());
+               std::string mod_str = string_compose (X_("%1-%2"), Keyboard::level4_modifier_name (), Keyboard::tertiary_modifier_name ());
 #else
-               Glib::ustring mod_str = Keyboard::secondary_modifier_name();
+               std::string mod_str = Keyboard::secondary_modifier_name();
 #endif
                Gtkmm2ext::UI::instance()->set_tip (_snap_modifier_combo,
                                                    (string_compose (_("<b>Recommended Setting: %1</b>%2"), mod_str, restart_msg)));
@@ -1028,8 +1029,8 @@ public:
                Label* l = manage (new Label (_("GUI and Font scaling:")));
                l->set_name ("OptionsLabel");
 
-                const Glib::ustring dflt = _("Default");
-                const Glib::ustring empty = X_(""); // despite gtk-doc saying so, NULL does not work as reference
+               const std::string dflt = _("Default");
+               const std::string empty = X_(""); // despite gtk-doc saying so, NULL does not work as reference
 
                _dpi_slider.set_name("FontScaleSlider");
                _dpi_slider.set_update_policy (UPDATE_DISCONTINUOUS);
@@ -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;
@@ -1718,6 +1719,72 @@ private:
        Button _xjadeo_browse_button;
 };
 
+class ColumVisibilityOption : public Option
+{
+       public:
+       ColumVisibilityOption (string id, string name, uint32_t n_col, sigc::slot<uint32_t> get, sigc::slot<bool, uint32_t> set)
+               : Option (id, name)
+               , _heading (name)
+               , _n_col (n_col)
+               , _get (get)
+               , _set (set)
+       {
+               cb = (CheckButton**) malloc (sizeof (CheckButton*) * n_col);
+               for (uint32_t i = 0; i < n_col; ++i) {
+                       CheckButton* col = manage (new CheckButton (string_compose (_("Column %1"), i + 1)));
+                       col->signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &ColumVisibilityOption::column_toggled), i));
+                       _hbox.pack_start (*col);
+                       cb[i] = col;
+               }
+               parameter_changed (id);
+       }
+
+       ~ColumVisibilityOption () {
+               free (cb);
+       }
+
+       Gtk::Widget& tip_widget() { return _hbox; }
+
+       void set_state_from_config ()
+       {
+               uint32_t c = _get();
+               for (uint32_t i = 0; i < _n_col; ++i) {
+                       bool en = (c & (1<<i)) ? true : false;
+                       if (cb[i]->get_active () != en) {
+                               cb[i]->set_active (en);
+                       }
+               }
+       }
+
+       void add_to_page (OptionEditorPage* p)
+       {
+               _heading.add_to_page (p);
+               add_widget_to_page (p, &_hbox);
+       }
+       private:
+
+       void column_toggled (int b) {
+               uint32_t c = _get();
+               uint32_t cc = c;
+               if (cb[b]->get_active ()) {
+                       c |= (1<<b);
+               } else {
+                       c &= ~(1<<b);
+               }
+               if (cc != c) {
+                       _set (c);
+               }
+       }
+
+       HBox _hbox;
+       OptionEditorHeading _heading;
+
+       CheckButton** cb;
+       uint32_t _n_col;
+       sigc::slot<uint32_t> _get;
+       sigc::slot<bool, uint32_t> _set;
+};
+
 
 /** A class which allows control of visibility of some editor components usign
  *  a VisibilityGroup.  The caller should pass in a `dummy' VisibilityGroup
@@ -1787,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));
 
@@ -1864,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"),
@@ -2150,14 +2224,6 @@ RCOptionEditor::RCOptionEditor ()
                     sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_draggable_playhead)
                     ));
 
-       add_option (_("Editor"),
-            new BoolOption (
-                    "show-track-meters",
-                    _("Show meters on tracks in the editor"),
-                    sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_track_meters),
-                    sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_track_meters)
-                    ));
-
        add_option (_("Editor"),
             new BoolOption (
                     "show-editor-meter",
@@ -2278,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"),
@@ -2291,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"),
@@ -2309,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<WaveformShape>* wfsh = new ComboOption<WaveformShape> (
                "waveform-shape",
@@ -2321,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 */
@@ -2395,11 +2461,10 @@ if (!Profile->get_mixbus()) {
        oac->add (ManualConnect, _("manually"));
 
        add_option (_("Audio"), oac);
-}  // !mixbus
 
        bo = new BoolOption (
                        "strict-io",
-                       _("Use 'Strict-I/O for new tracks or Busses"),
+                       _("Use 'Strict-I/O' for new tracks or Busses"),
                        sigc::mem_fun (*_rc_config, &RCConfiguration::get_strict_io),
                        sigc::mem_fun (*_rc_config, &RCConfiguration::set_strict_io)
                        );
@@ -2408,6 +2473,7 @@ if (!Profile->get_mixbus()) {
        Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(),
                        _("With strict-i/o enabled, Effect Processors will not modify the number of channels on a track. The number of output channels will always match the number of input channels."));
 
+}  // !mixbus
 
        add_option (_("Audio"), new OptionEditorHeading (_("Denormals")));
 
@@ -2458,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"),
@@ -2609,8 +2657,9 @@ if (!Profile->get_mixbus()) {
                     sigc::mem_fun (*_rc_config, &RCConfiguration::set_mute_affects_main_outs)
                     ));
 
-       add_option (_("Solo & mute"), new OptionEditorHeading (_("Send Routing")));
 
+if (!ARDOUR::Profile->get_mixbus()) {
+       add_option (_("Solo & mute"), new OptionEditorHeading (_("Send Routing")));
        add_option (_("Solo & mute"),
             new BoolOption (
                     "link-send-and-route-panner",
@@ -2618,6 +2667,7 @@ if (!Profile->get_mixbus()) {
                     sigc::mem_fun (*_rc_config, &RCConfiguration::get_link_send_and_route_panner),
                     sigc::mem_fun (*_rc_config, &RCConfiguration::set_link_send_and_route_panner)
                     ));
+}
 
        add_option (_("MIDI"), new OptionEditorHeading (_("MIDI Preferences")));
 
@@ -2672,9 +2722,9 @@ if (!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"),
@@ -2682,9 +2732,9 @@ if (!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"),
@@ -2692,7 +2742,7 @@ if (!Profile->get_mixbus()) {
                            sigc::mem_fun (*_rc_config, &RCConfiguration::set_send_mtc)
                            ));
 
-       add_option (_("MIDI"),
+       add_option (_("MIDI/Sync"),
                    new SpinOption<int> (
                            "mtc-qf-speed-tolerance",
                            _("Percentage either side of normal transport speed to transmit MTC"),
@@ -2701,9 +2751,9 @@ if (!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"),
@@ -2711,7 +2761,7 @@ if (!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"),
@@ -2719,7 +2769,7 @@ if (!Profile->get_mixbus()) {
                            sigc::mem_fun (*_rc_config, &RCConfiguration::set_send_mmc)
                            ));
 
-       add_option (_("MIDI"),
+       add_option (_("MIDI/Sync"),
             new SpinOption<uint8_t> (
                     "mmc-receive-device-id",
                     _("Inbound MMC device ID"),
@@ -2728,7 +2778,7 @@ if (!Profile->get_mixbus()) {
                     0, 128, 1, 10
                     ));
 
-       add_option (_("MIDI"),
+       add_option (_("MIDI/Sync"),
             new SpinOption<uint8_t> (
                     "mmc-send-device-id",
                     _("Outbound MMC device ID"),
@@ -2790,28 +2840,19 @@ if (!Profile->get_mixbus()) {
 
        add_option (_("Control Surfaces"), new ControlSurfacesOptions);
 
-       ComboOption<RemoteModel>* rm = new ComboOption<RemoteModel> (
-               "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"),
@@ -2821,11 +2862,30 @@ if (!Profile->get_mixbus()) {
        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)"));
-
 #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(),
+                                           _("<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."));
+
+       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. 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",
@@ -2833,7 +2893,7 @@ if (!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(),
                                            _("<b>When enabled</b> 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"));
 
@@ -2845,40 +2905,40 @@ if (!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(),
                                            _("<b>When enabled</b> 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:")));
@@ -2891,7 +2951,7 @@ if (!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",
@@ -2903,12 +2963,12 @@ if (!Profile->get_mixbus()) {
        Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(),
                                            _("<b>When enabled</b> 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:")));
@@ -2924,7 +2984,7 @@ if (!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",
@@ -2941,6 +3001,27 @@ if (!Profile->get_mixbus()) {
                        );
        add_option (_("Plugins"), _plugin_prefer_inline);
 #endif
+
+       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."));
+
 #endif
 
        /* INTERFACE */
@@ -2970,6 +3051,14 @@ if (!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",
@@ -2978,7 +3067,6 @@ if (!Profile->get_mixbus()) {
                     sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_widget_prelight)
                     ));
 
-#ifdef TOOLTIPS_GOT_FIXED
        add_option (S_("Preferences|GUI"),
             new BoolOption (
                     "use-tooltips",
@@ -2986,7 +3074,6 @@ if (!Profile->get_mixbus()) {
                     sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_use_tooltips),
                     sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_use_tooltips)
                     ));
-#endif
 
        add_option (S_("Preferences|GUI"),
             new BoolOption (
@@ -3051,6 +3138,7 @@ if (!ARDOUR::Profile->get_mixbus()) {
        _mixer_strip_visibility.add (0, X_("SoloIsoLock"), _("Solo Iso / Lock"));
        _mixer_strip_visibility.add (0, X_("Output"), _("Output"));
        _mixer_strip_visibility.add (0, X_("Comments"), _("Comments"));
+       _mixer_strip_visibility.add (0, X_("VCA"), _("VCA Assigns"));
 
        add_option (
                S_("Preferences|GUI"),
@@ -3070,6 +3158,14 @@ if (!ARDOUR::Profile->get_mixbus()) {
                     sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_default_narrow_ms)
                     ));
 
+       add_option (S_("Preferences|GUI"),
+                       new ColumVisibilityOption (
+                               "action-table-columns", _("Action Script Button Visibility"), 3,
+                               sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_action_table_columns),
+                               sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_action_table_columns)
+                               )
+                       );
+
        add_option (S_("Preferences|Metering"), new OptionEditorHeading (_("Metering")));
 
        ComboOption<float>* mht = new ComboOption<float> (
@@ -3219,15 +3315,46 @@ if (!ARDOUR::Profile->get_mixbus()) {
                     sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_meter_style_led)
                     ));
 
+       add_option (S_("Preferences|Metering"), new OptionEditorHeading (_("Editor Meters")));
+
+       add_option (S_("Preferences|Metering"),
+            new BoolOption (
+                    "show-track-meters",
+                    _("Show meters on tracks in the editor"),
+                    sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_show_track_meters),
+                    sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_show_track_meters)
+                    ));
+
+       add_option (S_("Preferences|Metering"),
+            new BoolOption (
+                    "editor-stereo-only-meters",
+                    _("Show at most stereo meters in the track-header"),
+                    sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_editor_stereo_only_meters),
+                    sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_editor_stereo_only_meters)
+                    ));
+
+       add_option (S_("Preferences|Metering"), new OptionEditorHeading (_("Post Export Analysis")));
+
+       add_option (S_("Preferences|Metering"),
+            new BoolOption (
+                    "save-export-analysis-image",
+                    _("Save loudness analysis as image file"),
+                    sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_save_export_analysis_image),
+                    sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_save_export_analysis_image)
+                    ));
+
        /* and now the theme manager */
 
        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
@@ -3362,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;
+}