From: Robin Gareus Date: Tue, 8 Dec 2015 14:20:46 +0000 (+0100) Subject: add open-gui-after-adding-plugin option to preferences X-Git-Tag: 4.5~261 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=17806b8cbb4ed4493ac78764247591350bdcb259;p=ardour.git add open-gui-after-adding-plugin option to preferences --- diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 0936e21c0e..f1a9640d93 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -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