Consolidate code: use API to print plugin-type 2/2

This commit is contained in:
Robin Gareus 2020-09-15 15:57:53 +02:00
parent dcea35191c
commit 07df51fbc7
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 2 additions and 36 deletions

View File

@ -153,19 +153,7 @@ InstrumentSelector::build_instrument_list()
#endif
if (p->plugintype_name_ambiguity) {
std::string pt;
switch (p->type) {
case AudioUnit:
pt = "AU";
break;
case Windows_VST:
case LXVST:
case MacVST:
pt = "VST";
break;
default:
pt = enum_2_string (p->type);
}
std::string pt = PluginManager::plugin_type_name (p->type);
if (!suffix.empty ()) {
suffix += ", ";
}

View File

@ -982,29 +982,7 @@ PluginSelector::build_plugin_menu ()
string
GetPluginTypeStr(PluginInfoPtr info)
{
string type;
switch (info->type) {
case LADSPA:
type = X_(" (LADSPA)");
break;
case AudioUnit:
type = X_(" (AU)");
break;
case LV2:
type = X_(" (LV2)");
break;
case Windows_VST:
case LXVST:
case MacVST:
type = X_(" (VST)");
break;
case Lua:
type = X_(" (Lua)");
break;
}
return type;
return string_compose (" (%1)", PluginManager::plugin_type_name (info->type, false));
}
Gtk::Menu*