From 87597f85c5a69a9accd3ce2ed88f2a006173e885 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 3 Feb 2010 04:46:56 +0000 Subject: Comprehensive use of cached URIs and more advanced Value (Atom) system. Atoms (e.g. property values or port values) can now be an Atom::DICT, which maps directly to/from an RDF resource. This is now used to store control bindings as a port property, eliminating the special API. Full interned URIs used everywhere, instead of CURIEs pretending to be URIs. Avoid converting string literals to URIs all over the place. Support for binding MIDI pitch bender and MIDI channel pressure. Saving/restoring of MIDI bindings as a free side-effect of the above. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2409 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/UploadPatchWindow.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/gui/UploadPatchWindow.cpp') diff --git a/src/gui/UploadPatchWindow.cpp b/src/gui/UploadPatchWindow.cpp index 300bcc71..1804ff06 100644 --- a/src/gui/UploadPatchWindow.cpp +++ b/src/gui/UploadPatchWindow.cpp @@ -23,6 +23,7 @@ #include #include "redlandmm/Query.hpp" #include "module/World.hpp" +#include "shared/LV2URIMap.hpp" #include "client/ClientStore.hpp" #include "interface/EngineInterface.hpp" #include "serialisation/Serialiser.hpp" @@ -72,13 +73,14 @@ UploadPatchWindow::present(SharedPtr patch) void UploadPatchWindow::on_show() { + const Shared::LV2URIMap& uris = App::instance().uris(); Gtk::Dialog::on_show(); - Raul::Atom atom = _patch->get_property("lv2:symbol"); + Raul::Atom atom = _patch->get_property(uris.lv2_symbol); if (atom.is_valid()) _symbol_entry->set_text(atom.get_string()); - atom = _patch->get_property("doap:name"); + atom = _patch->get_property(uris.doap_name); if (atom.is_valid()) _short_name_entry->set_text(atom.get_string()); } @@ -234,12 +236,14 @@ UploadPatchWindow::upload_clicked() { assert(!_thread); + const Shared::LV2URIMap& uris = App::instance().uris(); + Glib::ustring symbol = _symbol_entry->get_text(); Glib::ustring short_name = _short_name_entry->get_text(); GraphObject::Properties extra_rdf; - extra_rdf.insert(make_pair("lv2:symbol", symbol)); - extra_rdf.insert(make_pair("doap:name", short_name)); + extra_rdf.insert(make_pair(uris.lv2_symbol, symbol)); + extra_rdf.insert(make_pair(uris.doap_name, short_name)); _response = 0; _progress_pct = 0; -- cgit v1.2.1