From 0659ffb8c884ff0f2336fa130ea212168d8dee94 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 10 Aug 2021 15:38:02 +0200 Subject: [PATCH] Update UI, use new plugin-scan prefs Verbose scan as well as well discovery apply to all formats with external scanner app (VST2/3 and AU). --- gtk2_ardour/rc_option_editor.cc | 47 +++++++++++++++------------------ gtk2_ardour/startup_fsm.cc | 11 ++++---- 2 files changed, 27 insertions(+), 31 deletions(-) diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index ce3e8ab3b6..936dce3074 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -3681,6 +3681,16 @@ These settings will only take effect after %1 is restarted.\n\ #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(), + _("When enabled 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"), @@ -3690,6 +3700,16 @@ These settings will only take effect after %1 is restarted.\n\ 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)")); + + 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(), + _("When enabled additional information for every plugin is shown to the Plugin Manager Log.")); #endif bo = new BoolOption ( @@ -3720,29 +3740,6 @@ These settings will only take effect after %1 is restarted.\n\ add_option (_("Plugins/VST"), bo); #endif - bo = new BoolOption ( - "discover-vst-on-start", - _("Scan for [new] VST Plugins on Application Start"), - 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/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")); - -#ifdef WINDOWS_VST_SUPPORT - // currently verbose logging is only implemented for Windows VST. - 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/VST"), bo); - Gtkmm2ext::UI::instance()->set_tip (bo->tip_widget(), - _("When enabled additional information for every plugin is added to the Log Window.")); -#endif - #if (defined WINDOWS_VST_SUPPORT || defined MACVST_SUPPORT || defined LXVST_SUPPORT) add_option (_("Plugins/VST"), new OptionEditorHeading (_("VST 2.x"))); @@ -3756,7 +3753,6 @@ These settings will only take effect after %1 is restarted.\n\ sigc::mem_fun (*this, &RCOptionEditor::clear_vst2_blacklist), _("VST 2 Ignorelist:"))); #endif -#endif #ifdef LXVST_SUPPORT add_option (_("Plugins/VST"), @@ -3842,7 +3838,8 @@ These settings will only take effect after %1 is restarted.\n\ sigc::mem_fun (*_rc_config, &RCConfiguration::set_conceal_vst2_if_vst3_exists) )); #endif -#endif +#endif // VST3 +#endif // Any VST (2 or 3) #ifdef AUDIOUNIT_SUPPORT diff --git a/gtk2_ardour/startup_fsm.cc b/gtk2_ardour/startup_fsm.cc index 76af76d32c..29ee9bdd86 100644 --- a/gtk2_ardour/startup_fsm.cc +++ b/gtk2_ardour/startup_fsm.cc @@ -385,11 +385,10 @@ StartupFSM::show_plugin_scan_dialog () { set_state (WaitingForPlugins); - /* if the user does not ask to discover VSTs at startup, or if this is Mixbus, then the plugin scan - that we run here, during startup, should only use the existing plugin cache (if any). - */ - - const bool cache_only = (!Config->get_discover_vst_on_start() || Profile->get_mixbus()); + /* if the user does not ask to discover AU/VSTs at startup, or if this is Mixbus, then the plugin scan + * that we run here, during startup, should only use the existing plugin cache (if any). + */ + const bool cache_only = (!Config->get_discover_plugins_on_start () || Profile->get_mixbus ()); const bool verbose = new_user; plugin_scan_dialog = new PluginScanDialog (cache_only, verbose); @@ -401,7 +400,7 @@ StartupFSM::show_plugin_scan_dialog () * See also comments in PluginScanDialog::start() to understand the absurd complexities behind this call. */ - DEBUG_TRACE (DEBUG::GuiStartup, string_compose ("starting plugin dialog, cache only ? %1\n", !Config->get_discover_vst_on_start())); + DEBUG_TRACE (DEBUG::GuiStartup, string_compose ("starting plugin dialog, cache only ? %1\n", cache_only)); plugin_scan_dialog->start(); DEBUG_TRACE (DEBUG::GuiStartup, "plugin dialog done\n"); }