add open-gui-after-adding-plugin option to preferences
authorRobin Gareus <robin@gareus.org>
Tue, 8 Dec 2015 14:20:46 +0000 (15:20 +0100)
committerRobin Gareus <robin@gareus.org>
Tue, 8 Dec 2015 14:29:24 +0000 (15:29 +0100)
gtk2_ardour/rc_option_editor.cc

index 0936e21c0ec9302306953cba425be70c715b1fc1..f1a9640d9336ddafbfe9ada8cfe86cf1b35b3340 100644 (file)
@@ -1606,6 +1606,10 @@ public:
                , _timeout_adjustment (0, 0, 3000, 50, 50)
                , _timeout_slider (_timeout_adjustment)
        {
+               // TODO define an OptionActionButton (with callback),
+               // then use the OptionEditorPage's table
+               // and standardOptionEditorHeading
+
                Label *l;
                std::stringstream ss;
                Table* t = manage (new Table (2, 6));
@@ -1742,6 +1746,12 @@ public:
                parameter_changed ("verbose-plugin-scan");
        }
 
+       void add_to_page (OptionEditorPage* p) {
+               int const n = p->table.property_n_rows();
+               p->table.resize (n + 1, 3);
+               p->table.attach (*_box, 0, 3, n, n + 1, FILL | EXPAND);
+       }
+
 private:
        RCConfiguration* _rc_config;
        CheckButton _display_plugin_scan_progress;
@@ -2894,6 +2904,17 @@ if (!Profile->get_mixbus()) {
        add_option (_("Plugins"), new PluginOptions (_rc_config));
 #endif
 
+#if (defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT || defined AUDIOUNIT_SUPPORT || defined HAVE_LV2)
+       add_option (_("Plugins"), new OptionEditorHeading (_("Plugin GUI")));
+       add_option (_("Plugins"),
+            new BoolOption (
+                    "open-gui-after-adding-plugin",
+                    _("Automatically open the plugin GUI when adding a new plugin."),
+                    sigc::mem_fun (*_rc_config, &RCConfiguration::get_open_gui_after_adding_plugin),
+                    sigc::mem_fun (*_rc_config, &RCConfiguration::set_open_gui_after_adding_plugin)
+                    ));
+#endif
+
        /* INTERFACE */
 
 #ifdef OPTIONAL_CAIRO_IMAGE_SURFACE