mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
Show plugin format in menu lists. Particularly important on Mac, where you might have both AU and VST formats of a plugin
This commit is contained in:
parent
c6464e9c34
commit
8dff52ce01
1 changed files with 34 additions and 3 deletions
|
|
@ -785,6 +785,34 @@ PluginSelector::build_plugin_menu ()
|
||||||
items.push_back (MenuElem (_("By Category"), *manage (by_category)));
|
items.push_back (MenuElem (_("By Category"), *manage (by_category)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
Gtk::Menu*
|
Gtk::Menu*
|
||||||
PluginSelector::create_favs_menu (PluginInfoList& all_plugs)
|
PluginSelector::create_favs_menu (PluginInfoList& all_plugs)
|
||||||
{
|
{
|
||||||
|
|
@ -798,7 +826,8 @@ PluginSelector::create_favs_menu (PluginInfoList& all_plugs)
|
||||||
|
|
||||||
for (PluginInfoList::const_iterator i = all_plugs.begin(); i != all_plugs.end(); ++i) {
|
for (PluginInfoList::const_iterator i = all_plugs.begin(); i != all_plugs.end(); ++i) {
|
||||||
if (manager.get_status (*i) == PluginManager::Favorite) {
|
if (manager.get_status (*i) == PluginManager::Favorite) {
|
||||||
MenuElem elem ((*i)->name, (sigc::bind (sigc::mem_fun (*this, &PluginSelector::plugin_chosen_from_menu), *i)));
|
string typ = GetPluginTypeStr(*i);
|
||||||
|
MenuElem elem ((*i)->name + typ, (sigc::bind (sigc::mem_fun (*this, &PluginSelector::plugin_chosen_from_menu), *i)));
|
||||||
elem.get_child()->set_use_underline (false);
|
elem.get_child()->set_use_underline (false);
|
||||||
favs->items().push_back (elem);
|
favs->items().push_back (elem);
|
||||||
}
|
}
|
||||||
|
|
@ -857,7 +886,8 @@ PluginSelector::create_by_creator_menu (ARDOUR::PluginInfoList& all_plugs)
|
||||||
creator_submenu_map.insert (pair<std::string,Menu*> (creator, submenu));
|
creator_submenu_map.insert (pair<std::string,Menu*> (creator, submenu));
|
||||||
submenu->set_name("ArdourContextMenu");
|
submenu->set_name("ArdourContextMenu");
|
||||||
}
|
}
|
||||||
MenuElem elem ((*i)->name, (sigc::bind (sigc::mem_fun (*this, &PluginSelector::plugin_chosen_from_menu), *i)));
|
string typ = GetPluginTypeStr(*i);
|
||||||
|
MenuElem elem ((*i)->name+typ, (sigc::bind (sigc::mem_fun (*this, &PluginSelector::plugin_chosen_from_menu), *i)));
|
||||||
elem.get_child()->set_use_underline (false);
|
elem.get_child()->set_use_underline (false);
|
||||||
submenu->items().push_back (elem);
|
submenu->items().push_back (elem);
|
||||||
}
|
}
|
||||||
|
|
@ -895,7 +925,8 @@ PluginSelector::create_by_category_menu (ARDOUR::PluginInfoList& all_plugs)
|
||||||
category_submenu_map.insert (pair<std::string,Menu*> (category, submenu));
|
category_submenu_map.insert (pair<std::string,Menu*> (category, submenu));
|
||||||
submenu->set_name("ArdourContextMenu");
|
submenu->set_name("ArdourContextMenu");
|
||||||
}
|
}
|
||||||
MenuElem elem ((*i)->name, (sigc::bind (sigc::mem_fun (*this, &PluginSelector::plugin_chosen_from_menu), *i)));
|
string typ = GetPluginTypeStr(*i);
|
||||||
|
MenuElem elem ((*i)->name + typ, (sigc::bind (sigc::mem_fun (*this, &PluginSelector::plugin_chosen_from_menu), *i)));
|
||||||
elem.get_child()->set_use_underline (false);
|
elem.get_child()->set_use_underline (false);
|
||||||
submenu->items().push_back (elem);
|
submenu->items().push_back (elem);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue