diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-03-27 17:11:33 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-03-27 17:11:33 +0000 |
commit | 8beeee1684a10fe176191a8ea822492125074dd3 (patch) | |
tree | b4af246118c93619ffd9b204cde0c09c71f7039d | |
parent | 0a5d09bb335435a66c8b218aa857deed5fdd909f (diff) |
plugin manager: filter-by-type really is filter-by-category, so fix the naming and add real filter-by-type (API)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4912 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/plugin_selector.cc | 24 | ||||
-rw-r--r-- | gtk2_ardour/plugin_ui.cc | 1 |
2 files changed, 24 insertions, 1 deletions
diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc index 67a78645e0..2fd3aa8ee0 100644 --- a/gtk2_ardour/plugin_selector.cc +++ b/gtk2_ardour/plugin_selector.cc @@ -50,6 +50,7 @@ using namespace std; static const char* _filter_mode_strings[] = { N_("Name contains"), N_("Type contains"), + N_("Category contains"), N_("Author contains"), N_("Library contains"), N_("Favorites only"), @@ -208,14 +209,35 @@ PluginSelector::show_this_plugin (const PluginInfoPtr& info, const std::string& if (mode == _("Name contains")) { compstr = info->name; - } else if (mode == _("Type contains")) { + } else if (mode == _("Category contains")) { compstr = info->category; + } else if (mode == _("Type contains")) { + + switch (info->type) { + case LADSPA: + compstr = X_("LADSPA"); + break; + case AudioUnit: + compstr = X_("AudioUnit"); + break; + case LV2: + compstr = X_("LV2"); + break; + case VST: + compstr = X_("VST"); + break; + } + } else if (mode == _("Author contains")) { compstr = info->creator; } else if (mode == _("Library contains")) { compstr = info->path; } + if (compstr.empty()) { + return false; + } + transform (compstr.begin(), compstr.end(), compstr.begin(), ::toupper); if (compstr.find (filterstr) != string::npos) { diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index 874abea0d6..64c144410e 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -398,6 +398,7 @@ PlugUIBase::save_plugin_setting () prompter.set_type_hint (Gdk::WINDOW_TYPE_HINT_UTILITY); prompter.show_all(); + prompter.present (); switch (prompter.run ()) { case Gtk::RESPONSE_ACCEPT: |