summaryrefslogtreecommitdiff
path: root/gtk2_ardour/plugin_selector.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-03-21 22:20:17 +0100
committerRobin Gareus <robin@gareus.org>2017-03-21 22:20:17 +0100
commit159e956225ac28e417242e2a03ebeab0c6cb7359 (patch)
tree0b2ede7983dd6b3a9e62ca83a29bd3c7abe670ef /gtk2_ardour/plugin_selector.cc
parentab021101e7c3b7f5e5943793b024395b336cbc3f (diff)
Top-up "Utils" plugin filter
* move Generators unto Utility groups * all "MIDI" plugins (which are not Instruments) are Utils * Anaylsis, Analyser, Analyzer
Diffstat (limited to 'gtk2_ardour/plugin_selector.cc')
-rw-r--r--gtk2_ardour/plugin_selector.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc
index d3cad6520d..7b8e2b4ace 100644
--- a/gtk2_ardour/plugin_selector.cc
+++ b/gtk2_ardour/plugin_selector.cc
@@ -269,6 +269,16 @@ PluginSelector::added_row_clicked(GdkEventButton* event)
btn_remove_clicked();
}
+static bool is_analyzer (const PluginInfoPtr& info) {
+ // Anaylsis, Analyzer are for backwards compatibility (vst cache)
+ return info->in_category ("Analyser") || info->in_category ("Anaylsis") || info->in_category ("Analyzer");
+}
+
+static bool is_util (const PluginInfoPtr& info) {
+ // all MIDI plugins which are not Instruments are Utils.
+ return info->in_category ("Utility") || info->in_category ("MIDI") || info->in_category ("Generator");
+}
+
bool
PluginSelector::show_this_plugin (const PluginInfoPtr& info, const std::string& filterstr)
{
@@ -290,10 +300,10 @@ PluginSelector::show_this_plugin (const PluginInfoPtr& info, const std::string&
if (_show_instruments == Gtkmm2ext::Off && info->is_instrument()) {
return false;
}
- if (_show_analysers == Gtkmm2ext::Off && info->in_category ("Analyser")) {
+ if (_show_analysers == Gtkmm2ext::Off && is_analyzer (info)) {
return false;
}
- if (_show_utils == Gtkmm2ext::Off && info->in_category ("Utility")) {
+ if (_show_utils == Gtkmm2ext::Off && is_util (info)) {
return false;
}
@@ -305,10 +315,10 @@ PluginSelector::show_this_plugin (const PluginInfoPtr& info, const std::string&
if (_show_instruments == Gtkmm2ext::ExplicitActive && info->is_instrument()) {
exp_ok = true;
}
- if (_show_analysers == Gtkmm2ext::ExplicitActive && info->in_category ("Analyser")) {
+ if (_show_analysers == Gtkmm2ext::ExplicitActive && is_analyzer(info)) {
exp_ok = true;
}
- if (_show_utils == Gtkmm2ext::ExplicitActive && info->in_category ("Utility")) {
+ if (_show_utils == Gtkmm2ext::ExplicitActive && is_util (info)) {
exp_ok = true;
}
if (_show_instruments == Gtkmm2ext::ExplicitActive || _show_analysers == Gtkmm2ext::ExplicitActive || _show_utils == Gtkmm2ext::ExplicitActive) {