summaryrefslogtreecommitdiffstats
path: root/src/gui/NewSubpatchWindow.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-02-19 05:10:29 +0000
committerDavid Robillard <d@drobilla.net>2011-02-19 05:10:29 +0000
commit6b18de71d1c603255b263a64434005306f152f13 (patch)
tree09c6e87acca1fe76bc74b3b549fee7ad09751993 /src/gui/NewSubpatchWindow.cpp
parent8e07e115429a0869593d4f29dc3e6cf5c8b25049 (diff)
downloadingen-6b18de71d1c603255b263a64434005306f152f13.tar.gz
ingen-6b18de71d1c603255b263a64434005306f152f13.tar.bz2
ingen-6b18de71d1c603255b263a64434005306f152f13.zip
Save/load patches as nested bundles (fix ticket #520).
Sane (context-based, ala RDF quads) approach to the problem of externally visible / internally visible properties. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2993 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/NewSubpatchWindow.cpp')
-rw-r--r--src/gui/NewSubpatchWindow.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/NewSubpatchWindow.cpp b/src/gui/NewSubpatchWindow.cpp
index 44fb54b0..13ea0c47 100644
--- a/src/gui/NewSubpatchWindow.cpp
+++ b/src/gui/NewSubpatchWindow.cpp
@@ -96,14 +96,17 @@ NewSubpatchWindow::ok_clicked()
const Path path = _patch->path().base() + Path::nameify(_name_entry->get_text());
const uint32_t poly = _poly_spinbutton->get_value_as_int();
+ // Create patch
Resource::Properties props;
props.insert(make_pair(app.uris().rdf_type, app.uris().ingen_Patch));
props.insert(make_pair(app.uris().ingen_polyphony, Atom(int32_t(poly))));
- app.engine()->put(ResourceImpl::meta_uri(path), props);
+ props.insert(make_pair(app.uris().ingen_enabled, Atom(bool(true))));
+ app.engine()->put(path, props, Resource::INTERNAL);
+ // Set external (node perspective) properties
props = _initial_data;
- props.insert(make_pair(app.uris().ingen_enabled, bool(true)));
- app.engine()->put(path, props);
+ props.insert(make_pair(app.uris().rdf_type, app.uris().ingen_Patch));
+ app.engine()->put(path, _initial_data, Resource::EXTERNAL);
hide();
}