From 3eb918b6b08821cecd92381c3f8c7967ca5bd995 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 29 Jan 2015 22:49:40 +0000 Subject: Add lilv_file_uri_parse() for correct URI to path conversion. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5528 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/PluginUI.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/client') diff --git a/src/client/PluginUI.cpp b/src/client/PluginUI.cpp index 4b8651db..31e1f9ae 100644 --- a/src/client/PluginUI.cpp +++ b/src/client/PluginUI.cpp @@ -238,6 +238,11 @@ PluginUI::create(Ingen::World* world, lilv_node_free(ui_plugin); lilv_node_free(ui_portNotification); + const char* bundle_uri = lilv_node_as_uri(lilv_ui_get_bundle_uri(ui)); + const char* binary_uri = lilv_node_as_uri(lilv_ui_get_binary_uri(ui)); + char* bundle_path = lilv_file_uri_parse(bundle_uri, NULL); + char* binary_path = lilv_file_uri_parse(binary_uri, NULL); + // Instantiate the actual plugin UI via Suil SuilInstance* instance = suil_instance_new( PluginUI::ui_host, @@ -246,10 +251,12 @@ PluginUI::create(Ingen::World* world, lilv_node_as_uri(lilv_plugin_get_uri(plugin)), lilv_node_as_uri(lilv_ui_get_uri(ui)), lilv_node_as_uri(ui_type), - lilv_uri_to_path(lilv_node_as_uri(lilv_ui_get_bundle_uri(ui))), - lilv_uri_to_path(lilv_node_as_uri(lilv_ui_get_binary_uri(ui))), + bundle_path, + binary_path, ret->_features->array()); + free(binary_path); + free(bundle_path); lilv_node_free(gtk_ui); if (!instance) { -- cgit v1.2.1