#include "gui_thread.h"
#include "tooltips.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
using namespace ARDOUR;
using namespace PBD;
filter_frame->show_all ();
+ HBox* side_by_side = manage (new HBox);
+ VBox* right_side = manage (new VBox);
+
table->attach (scroller, 0, 7, 0, 5);
table->attach (*filter_frame, 0, 7, 6, 7, FILL|EXPAND, FILL, 5, 5);
- table->attach(*btn_add, 1, 2, 7, 8, FILL, FILL, 5, 5);
- table->attach(*btn_remove, 5, 6, 7, 8, FILL, FILL, 5, 5);
- table->attach(ascroller, 0, 7, 8, 10);
+ right_side->pack_start (ascroller);
+
+ HBox* add_remove = manage (new HBox);
+ add_remove->pack_start (*btn_add, true, true);
+ add_remove->pack_start (*btn_remove, true, true);
+
+ right_side->pack_start (*add_remove, false, false);
+ right_side->set_size_request (200, -1);
+
+ side_by_side->pack_start (*table);
+ side_by_side->pack_start (*right_side);
add_button (Stock::CLOSE, RESPONSE_CLOSE);
add_button (_("Insert Plugin(s)"), RESPONSE_APPLY);
set_default_response (RESPONSE_APPLY);
set_response_sensitive (RESPONSE_APPLY, false);
- get_vbox()->pack_start (*table);
+ get_vbox()->pack_start (*side_by_side);
table->set_name("PluginSelectorTable");
plugin_display.set_name("PluginSelectorDisplay");
btn_remove_clicked();
}
+static bool is_analyzer (const PluginInfoPtr& info) {
+ // Anaylsis, Analyzer are for backwards compatibility (vst cache)
+ return info->in_category ("Analyser") || info->in_category ("Anaylsis") || info->in_category ("Analyzer");
+}
+
+static bool is_util (const PluginInfoPtr& info) {
+ // all MIDI plugins which are not Instruments are Utils.
+ return info->in_category ("Utility") || info->in_category ("MIDI") || info->in_category ("Generator");
+}
+
bool
PluginSelector::show_this_plugin (const PluginInfoPtr& info, const std::string& filterstr)
{
if (_show_instruments == Gtkmm2ext::Off && info->is_instrument()) {
return false;
}
- if (_show_analysers == Gtkmm2ext::Off && info->in_category ("Analyser")) {
+ if (_show_analysers == Gtkmm2ext::Off && is_analyzer (info)) {
return false;
}
- if (_show_utils == Gtkmm2ext::Off && info->in_category ("Utility")) {
+ if (_show_utils == Gtkmm2ext::Off && is_util (info)) {
return false;
}
if (_show_instruments == Gtkmm2ext::ExplicitActive && info->is_instrument()) {
exp_ok = true;
}
- if (_show_analysers == Gtkmm2ext::ExplicitActive && info->in_category ("Analyser")) {
+ if (_show_analysers == Gtkmm2ext::ExplicitActive && is_analyzer(info)) {
exp_ok = true;
}
- if (_show_utils == Gtkmm2ext::ExplicitActive && info->in_category ("Utility")) {
+ if (_show_utils == Gtkmm2ext::ExplicitActive && is_util (info)) {
exp_ok = true;
}
if (_show_instruments == Gtkmm2ext::ExplicitActive || _show_analysers == Gtkmm2ext::ExplicitActive || _show_utils == Gtkmm2ext::ExplicitActive) {
case LXVST:
compstr = X_("LXVST");
break;
+ case MacVST:
+ compstr = X_("MacVST");
+ break;
case Lua:
compstr = X_("Lua");
break;
lv2_refiller (filterstr);
vst_refiller (filterstr);
lxvst_refiller (filterstr);
+ mac_vst_refiller (filterstr);
au_refiller (filterstr);
lua_refiller (filterstr);
#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)
#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
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)
{
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);
}
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);
}
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);
}