From 36039b294ee823ceb2c239129defc5eafa110247 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 28 Jan 2010 18:45:27 +0000 Subject: 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 --- src/serialisation/Parser.cpp | 12 ++++++++++++ src/serialisation/Parser.hpp | 2 ++ 2 files changed, 14 insertions(+) (limited to 'src/serialisation') 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); }; -- cgit v1.2.1