13
0

option to en/dis-able VST plugin discovery on startup

This commit is contained in:
Robin Gareus 2014-02-25 18:48:08 +01:00
parent 78801e12a6
commit 64c2328a8a
4 changed files with 33 additions and 12 deletions

View File

@ -999,27 +999,34 @@ public:
PluginOptions (RCConfiguration* c)
: _rc_config (c)
, _display_plugin_scan_progress (_("Display Plugin Scan Progress"))
, _discover_vst_on_start (_("Scan for new VST Plugin on Application Start"))
{
Table* t = manage (new Table (2, 6));
t->set_spacings (4);
Button* b;
b = manage (new Button (_("Refresh Plugin List")));
b->signal_clicked().connect (sigc::mem_fun (*this, &PluginOptions::refresh_clicked));
t->attach (*b, 0, 2, 0, 1, FILL);
b = manage (new Button (_("Clear VST Cache")));
b->signal_clicked().connect (sigc::mem_fun (*this, &PluginOptions::clear_vst_cache_clicked));
t->attach (*b, 0, 2, 0, 1, FILL);
t->attach (*b, 0, 2, 1, 2, FILL);
b = manage (new Button (_("Clear VST Blacklist")));
b->signal_clicked().connect (sigc::mem_fun (*this, &PluginOptions::clear_vst_blacklist_clicked));
t->attach (*b, 0, 2, 1, 2, FILL);
b = manage (new Button (_("Refresh Plugin List")));
b->signal_clicked().connect (sigc::mem_fun (*this, &PluginOptions::refresh_clicked));
t->attach (*b, 0, 2, 2, 3, FILL);
t->attach (_display_plugin_scan_progress, 0, 2, 3, 4);
t->attach (_discover_vst_on_start, 0, 2, 3, 4);
_discover_vst_on_start.signal_toggled().connect (sigc::mem_fun (*this, &PluginOptions::discover_vst_on_start_toggled));
Gtkmm2ext::UI::instance()->set_tip (_discover_vst_on_start,
_("<b>When enabled</b> VST plugins are searched and tested on application start. When disabled they a Refresh will have to be tiggered manually"));
t->attach (_display_plugin_scan_progress, 0, 2, 4, 5);
_display_plugin_scan_progress.signal_toggled().connect (sigc::mem_fun (*this, &PluginOptions::display_plugin_scan_progress_toggled));
Gtkmm2ext::UI::instance()->set_tip (_display_plugin_scan_progress,
_("<b>When enabled</b> a popup window details plugin-scan."));
_("<b>When enabled</b> display a popup window showing plugin scan progress."));
_box->pack_start (*t,true,true);
}
@ -1029,19 +1036,32 @@ public:
bool const x = _rc_config->get_show_plugin_scan_window();
_display_plugin_scan_progress.set_active (x);
}
else if (p == "discover-vst-on-start") {
bool const x = _rc_config->get_discover_vst_on_start();
_discover_vst_on_start.set_active (x);
}
}
void set_state_from_config () {
parameter_changed ("show-plugin-scan-window");
parameter_changed ("discover-vst-on-start");
}
private:
RCConfiguration* _rc_config;
CheckButton _display_plugin_scan_progress;
CheckButton _discover_vst_on_start;
void display_plugin_scan_progress_toggled () {
bool const x = _display_plugin_scan_progress.get_active ();
_rc_config->set_show_plugin_scan_window (x);
bool const x = _display_plugin_scan_progress.get_active();
_rc_config->set_show_plugin_scan_window(x);
}
void discover_vst_on_start_toggled () {
bool const x = _discover_vst_on_start.get_active();
_rc_config->set_discover_vst_on_start(x);
}
void clear_vst_cache_clicked () {
PluginManager::instance().clear_vst_cache();
}

View File

@ -205,6 +205,7 @@ CONFIG_VARIABLE (bool, use_plugin_own_gui, "use-plugin-own-gui", true)
CONFIG_VARIABLE (bool, use_windows_vst, "use-windows-vst", true)
CONFIG_VARIABLE (bool, use_lxvst, "use-lxvst", true)
CONFIG_VARIABLE (bool, show_plugin_scan_window, "show-plugin-scan-window", true)
CONFIG_VARIABLE (bool, discover_vst_on_start, "discover-vst-on-start", false)
/* denormal management */

View File

@ -364,7 +364,7 @@ ARDOUR::init_post_engine ()
/* find plugins */
ARDOUR::PluginManager::instance().refresh ();
ARDOUR::PluginManager::instance().refresh (!Config->get_discover_vst_on_start());
}
void

View File

@ -195,13 +195,13 @@ PluginManager::refresh (bool cache_only)
#endif
#ifdef WINDOWS_VST_SUPPORT
if (Config->get_use_windows_vst()) {
windows_vst_refresh ();
windows_vst_refresh (cache_only);
}
#endif // WINDOWS_VST_SUPPORT
#ifdef LXVST_SUPPORT
if(Config->get_use_lxvst()) {
lxvst_refresh();
lxvst_refresh(cache_only);
}
#endif //Native linuxVST SUPPORT