From 2edb1283923b3c9b31d289342c74688975cb45fa Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 8 Mar 2011 19:58:25 +0000 Subject: Update for new SLV2 UI API. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3056 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/PluginUI.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/client/PluginUI.cpp') diff --git a/src/client/PluginUI.cpp b/src/client/PluginUI.cpp index 8233506c..3005a02a 100644 --- a/src/client/PluginUI.cpp +++ b/src/client/PluginUI.cpp @@ -34,6 +34,8 @@ using namespace Raul; namespace Ingen { namespace Client { +SLV2UIHost PluginUI::ui_host = NULL; + static void lv2_ui_write(LV2UI_Controller controller, uint32_t port_index, @@ -120,6 +122,10 @@ PluginUI::create(Ingen::Shared::World* world, SharedPtr node, SLV2Plugin plugin) { + if (!PluginUI::ui_host) { + PluginUI::ui_host = slv2_ui_host_new(lv2_ui_write, NULL, NULL, NULL); + } + SharedPtr ret(new PluginUI(world, node)); ret->_features = world->lv2_features()->lv2_features(world, node.get()); @@ -128,14 +134,12 @@ PluginUI::create(Ingen::Shared::World* world, SLV2UI ui = slv2_plugin_get_default_ui(plugin, gtk_ui); - SLV2UIHost ui_host = slv2_ui_host_new( - ret.get(), lv2_ui_write, NULL, NULL, NULL); - SLV2UIInstance instance = slv2_ui_instance_new( plugin, ui, gtk_ui, ui_host, + ret.get(), ret->_features->array()); slv2_ui_host_free(ui_host); -- cgit v1.2.1