Re-use the Mixer's PluginManager (singleton)

Previously there were three plugin-manager instances (two of which
were never destroyed).

There were also 3 sets of context-menus (favorites, by tag, by author..),
all of which were re-built when plugin stati changed.

Since the Plugin-manager is a modal dialog, it can be re-used in
all contexts (route-ui, monitor-section, mixer).
This commit is contained in:
Robin Gareus 2019-05-25 00:12:55 +02:00
parent ce8740cf5e
commit 92cfed14cf
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
4 changed files with 16 additions and 9 deletions

View file

@ -108,7 +108,6 @@ MonitorSection::MonitorSection ()
channel_size_group = SizeGroup::create (SIZE_GROUP_HORIZONTAL);
_plugin_selector = new PluginSelector (PluginManager::instance());
insert_box = new ProcessorBox (0, boost::bind (&MonitorSection::plugin_selector, this), _rr_selection, 0);
insert_box->set_no_show_all ();
insert_box->show ();
@ -587,7 +586,6 @@ void
MonitorSection::set_session (Session* s)
{
RouteUI::set_session (s);
_plugin_selector->set_session (_session);
insert_box->set_session (_session);
Glib::RefPtr<ActionGroup> global_monitor_actions = ActionManager::get_action_group (X_("Monitor Section"));
@ -1613,6 +1611,12 @@ MonitorSection::processors_changed (ARDOUR::RouteProcessorChange)
update_processor_box ();
}
PluginSelector*
MonitorSection::plugin_selector ()
{
return Mixer_UI::instance()->plugin_selector ();
}
void
MonitorSection::use_others_actions ()
{