diff options
author | David Robillard <d@drobilla.net> | 2015-11-14 18:58:13 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-09-11 14:41:15 +0200 |
commit | 7dd82030ec60df74db7be51a6b8b3bb4a8a9f5a3 (patch) | |
tree | 8a84ba91617b043893452dcb506c7a66e71a7c9b /src | |
parent | a62ce15ddeac5676e7fb6ff413da42ec8b0f4a11 (diff) | |
download | ingen-7dd82030ec60df74db7be51a6b8b3bb4a8a9f5a3.tar.gz ingen-7dd82030ec60df74db7be51a6b8b3bb4a8a9f5a3.tar.bz2 ingen-7dd82030ec60df74db7be51a6b8b3bb4a8a9f5a3.zip |
Use URIDs for prototypes
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/GraphCanvas.cpp | 2 | ||||
-rw-r--r-- | src/gui/NodeMenu.cpp | 2 | ||||
-rw-r--r-- | src/gui/PropertiesWindow.cpp | 12 |
3 files changed, 6 insertions, 10 deletions
diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp index ea989c36..b81960ef 100644 --- a/src/gui/GraphCanvas.cpp +++ b/src/gui/GraphCanvas.cpp @@ -720,7 +720,7 @@ GraphCanvas::paste() const Raul::Path& new_path = avoider.map_path(parent.child(node->path())); Node::Properties props{{uris.lv2_prototype, - _app.forge().alloc_uri(old_uri)}}; + _app.forge().make_urid(old_uri)}}; // Set the same types const auto t = node->properties().equal_range(uris.rdf_type); diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp index 9d827d59..f08754fa 100644 --- a/src/gui/NodeMenu.cpp +++ b/src/gui/NodeMenu.cpp @@ -224,7 +224,7 @@ NodeMenu::on_save_preset_activated() { _app->uris().rdfs_label, _app->forge().alloc(basename) }, { _app->uris().lv2_prototype, - _app->forge().alloc_uri(block()->uri()) }}; + _app->forge().make_urid(block()->uri()) }}; _app->interface()->put(Raul::URI(real_uri), props); } } diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp index 09474027..2b77f93e 100644 --- a/src/gui/PropertiesWindow.cpp +++ b/src/gui/PropertiesWindow.cpp @@ -451,14 +451,10 @@ PropertiesWindow::get_value(LV2_URID type, Gtk::Widget* value_widget) } } else if (type == forge.URI || type == forge.URID) { URIEntry* uri_entry = dynamic_cast<URIEntry*>(value_widget); - if (uri_entry) { - if (Raul::URI::is_valid(uri_entry->get_text())) { - return _app->forge().make_urid( - _app->world()->uri_map().map_uri(uri_entry->get_text())); - } else { - _app->log().error(fmt("Invalid URI <%1%>\n\n") - % uri_entry->get_text()); - } + if (uri_entry && Raul::URI::is_valid(uri_entry->get_text())) { + return _app->forge().make_urid(Raul::URI(uri_entry->get_text())); + } else { + _app->log().error(fmt("Invalid URI <%1%>\n") % uri_entry->get_text()); } } else if (type == forge.String) { Gtk::Entry* entry = dynamic_cast<Gtk::Entry*>(value_widget); |