mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-26 06:58:22 +01:00
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
This commit is contained in:
parent
0a5d09bb33
commit
8beeee1684
2 changed files with 24 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue