NO-OP; clean up script spacing and remove goto
[ardour.git] / gtk2_ardour / plugin_selector.cc
index 3a0fed0d67851e0e1effdb6bde010903ec70d3be..d3cad6520d1b3b55652772658e475e0923127b6b 100644 (file)
@@ -341,6 +341,9 @@ PluginSelector::show_this_plugin (const PluginInfoPtr& info, const std::string&
                        case LXVST:
                                compstr = X_("LXVST");
                                break;
+                       case MacVST:
+                               compstr = X_("MacVST");
+                               break;
                        case Lua:
                                compstr = X_("Lua");
                                break;
@@ -390,6 +393,7 @@ PluginSelector::refill ()
        lv2_refiller (filterstr);
        vst_refiller (filterstr);
        lxvst_refiller (filterstr);
+       mac_vst_refiller (filterstr);
        au_refiller (filterstr);
        lua_refiller (filterstr);
 
@@ -501,6 +505,18 @@ PluginSelector::lxvst_refiller (const std::string&)
 #endif
 }
 
+void
+#ifdef MACVST_SUPPORT
+PluginSelector::mac_vst_refiller (const std::string& filterstr)
+#else
+PluginSelector::mac_vst_refiller (const std::string&)
+#endif
+{
+#ifdef MACVST_SUPPORT
+       refiller (manager.mac_vst_plugin_info(), filterstr, "MacVST");
+#endif
+}
+
 void
 #ifdef AUDIOUNIT_SUPPORT
 PluginSelector::au_refiller (const std::string& filterstr)
@@ -736,6 +752,9 @@ PluginSelector::build_plugin_menu ()
 #ifdef LXVST_SUPPORT
        all_plugs.insert (all_plugs.end(), manager.lxvst_plugin_info().begin(), manager.lxvst_plugin_info().end());
 #endif
+#ifdef MACVST_SUPPORT
+       all_plugs.insert (all_plugs.end(), manager.mac_vst_plugin_info().begin(), manager.mac_vst_plugin_info().end());
+#endif
 #ifdef AUDIOUNIT_SUPPORT
        all_plugs.insert (all_plugs.end(), manager.au_plugin_info().begin(), manager.au_plugin_info().end());
 #endif
@@ -766,6 +785,34 @@ PluginSelector::build_plugin_menu ()
        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*
 PluginSelector::create_favs_menu (PluginInfoList& all_plugs)
 {
@@ -779,7 +826,8 @@ PluginSelector::create_favs_menu (PluginInfoList& all_plugs)
 
        for (PluginInfoList::const_iterator i = all_plugs.begin(); i != all_plugs.end(); ++i) {
                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);
                        favs->items().push_back (elem);
                }
@@ -838,7 +886,8 @@ PluginSelector::create_by_creator_menu (ARDOUR::PluginInfoList& all_plugs)
                        creator_submenu_map.insert (pair<std::string,Menu*> (creator, submenu));
                        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);
                submenu->items().push_back (elem);
        }
@@ -876,7 +925,8 @@ PluginSelector::create_by_category_menu (ARDOUR::PluginInfoList& all_plugs)
                        category_submenu_map.insert (pair<std::string,Menu*> (category, submenu));
                        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);
                submenu->items().push_back (elem);
        }