Consolidate code: use API to print plugin-type 2/2
This commit is contained in:
parent
dcea35191c
commit
07df51fbc7
|
@ -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 += ", ";
|
||||
}
|
||||
|
|
|
@ -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*
|
||||
|
|
Loading…
Reference in New Issue