o_selected_plug = -1;
i_selected_plug = 0;
- current_selection = ARDOUR::PluginInfo::LADSPA;
+ current_selection = PluginInfo::LADSPA;
lmodel = Gtk::ListStore::create(lcols);
ladspa_display.set_model (lmodel);
PluginSelector::input_refiller ()
{
guint row;
- list<PluginInfo *> &plugs = manager->ladspa_plugin_info ();
- list<PluginInfo *>::iterator i;
+ PluginInfoList &plugs = manager->ladspa_plugin_info ();
+ PluginInfoList::iterator i;
char ibuf[16], obuf[16];
lmodel->clear();
PluginSelector::vst_refiller ()
{
guint row;
- list<PluginInfo *> &plugs = manager->vst_plugin_info ();
- list<PluginInfo *>::iterator i;
+ PluginInfoList &plugs = manager->vst_plugin_info ();
+ PluginInfoList::iterator i;
char ibuf[16], obuf[16];
vmodel->clear();
btn_add->set_sensitive (false);
}
- current_selection = ARDOUR::PluginInfo::VST;
+ current_selection = PluginInfo::VST;
}
#endif //VST_SUPPORT
PluginSelector::au_refiller ()
{
guint row;
- list<PluginInfo *> &plugs = manager->au_plugin_info ();
- list<PluginInfo *>::iterator i;
+ PluginInfoList &plugs = manager->au_plugin_info ();
+ PluginInfoList::iterator i;
char ibuf[16], obuf[16];
aumodel->clear();
btn_add->set_sensitive (false);
}
- current_selection = ARDOUR::PluginInfo::AudioUnit;
+ current_selection = PluginInfo::AudioUnit;
}
#endif //HAVE_COREAUDIO
void
-PluginSelector::use_plugin (PluginInfo* pi)
+PluginSelector::use_plugin (PluginInfoPtr pi)
{
- list<PluginInfo *>::iterator i;
-
- if (pi == 0 || session == 0) {
+ if (session == 0) {
return;
}
PluginSelector::btn_add_clicked()
{
std::string name;
- ARDOUR::PluginInfo *pi;
+ PluginInfoPtr pi;
Gtk::TreeModel::Row newrow = *(amodel->append());
Gtk::TreeModel::Row row;
switch (current_selection) {
- case ARDOUR::PluginInfo::LADSPA:
+ case PluginInfo::LADSPA:
row = *(ladspa_display.get_selection()->get_selected());
name = row[lcols.name];
pi = row[lcols.plugin];
- added_plugins.push_back (row[lcols.plugin]);
break;
- case ARDOUR::PluginInfo::VST:
+ case PluginInfo::VST:
#ifdef VST_SUPPORT
row = *(vst_display.get_selection()->get_selected());
name = row[vcols.name];
pi = row[vcols.plugin];
- added_plugins.push_back (row[vcols.plugin]);
#endif
break;
- case ARDOUR::PluginInfo::AudioUnit:
+ case PluginInfo::AudioUnit:
#ifdef HAVE_COREAUDIO
row = *(au_display.get_selection()->get_selected());
name = row[aucols.name];
pi = row[aucols.plugin];
- added_plugins.push_back (row[aucols.plugin]);
#endif
break;
default:
void
PluginSelector::btn_remove_clicked()
{
- list<PluginInfo*>::iterator i;
Gtk::TreeModel::iterator iter = added_list.get_selection()->get_selected();
- for (i = added_plugins.begin(); (*i) != (*iter)[acols.plugin]; ++i);
-
- added_plugins.erase(i);
+
amodel->erase(iter);
if (amodel->children().empty()) {
- set_response_sensitive (RESPONSE_APPLY, false);
+ set_response_sensitive (RESPONSE_APPLY, false);
}
-
-
}
void
btn_add->set_sensitive (false);
}
- current_selection = ARDOUR::PluginInfo::LADSPA;
+ current_selection = PluginInfo::LADSPA;
}
void
PluginSelector::run ()
{
ResponseType r;
- list<PluginInfo*>::iterator i;
+ TreeModel::Children::iterator i;
r = (ResponseType) Dialog::run ();
switch (r) {
case RESPONSE_APPLY:
- for (i = added_plugins.begin(); i != added_plugins.end(); ++i){
- use_plugin (*i);
+ for (i = amodel->children().begin(); i != amodel->children().end(); ++i) {
+ use_plugin ((*i)[acols.plugin]);
}
break;
PluginSelector::cleanup ()
{
hide();
- added_plugins.clear();
amodel->clear();
}