diff options
author | David Robillard <d@drobilla.net> | 2010-01-28 18:45:27 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-01-28 18:45:27 +0000 |
commit | 36039b294ee823ceb2c239129defc5eafa110247 (patch) | |
tree | 3b6c2f22f7cb3aab60c85a28364059a38a01f1b9 | |
parent | cf099732084c20dfe45ae78b2d64816f2bf03ab6 (diff) | |
download | ingen-36039b294ee823ceb2c239129defc5eafa110247.tar.gz ingen-36039b294ee823ceb2c239129defc5eafa110247.tar.bz2 ingen-36039b294ee823ceb2c239129defc5eafa110247.zip |
Don't load ingen:node and lv2:port as properties (so they don't show up in properties window).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2390 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/serialisation/Parser.cpp | 12 | ||||
-rw-r--r-- | src/serialisation/Parser.hpp | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/serialisation/Parser.cpp b/src/serialisation/Parser.cpp index cee4d656..2a65d0c3 100644 --- a/src/serialisation/Parser.cpp +++ b/src/serialisation/Parser.cpp @@ -448,6 +448,8 @@ Parser::parse_patch( Objects::iterator plug_i = plugin_nodes.find(node.to_string()); Types::iterator type_i = types.find(node.to_string()); if (node.type() == Redland::Node::RESOURCE && type_i != types.end()) { + if (skip_property(predicate)) + continue; const string key = world->rdf_world->qualify(predicate.to_string()); if (patch_i != patch_nodes.end()) { patch_i->second.insert(make_pair(key, AtomRDF::node_to_atom(object))); @@ -714,6 +716,8 @@ Parser::parse_properties( Glib::Mutex::Lock lock(world->rdf_world->mutex()); const string key = world->rdf_world->qualify(string((*i)["key"])); const Redland::Node& val = (*i)["val"]; + if (skip_property((*i)["key"])) + continue; if (key != "" && val.type() != Redland::Node::BLANK) properties.insert(make_pair(key, AtomRDF::node_to_atom(val))); } @@ -728,6 +732,14 @@ Parser::parse_properties( } +bool +Parser::skip_property(const Redland::Node& predicate) +{ + return (predicate.to_string() == "http://drobilla.net/ns/ingen#node" + || predicate.to_string() == "http://lv2plug.in/ns/lv2core#port"); +} + + } // namespace Serialisation } // namespace Ingen diff --git a/src/serialisation/Parser.hpp b/src/serialisation/Parser.hpp index a5ab9400..99c6dc81 100644 --- a/src/serialisation/Parser.hpp +++ b/src/serialisation/Parser.hpp @@ -109,6 +109,8 @@ private: Redland::Model& model, const Redland::Node& subject, const Raul::Path& patch); + + bool skip_property(const Redland::Node& predicate); }; |