summaryrefslogtreecommitdiffstats
path: root/src/gui/NewSubpatchWindow.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-27 17:42:51 +0000
committerDavid Robillard <d@drobilla.net>2009-05-27 17:42:51 +0000
commitc11ecf0fd10641218326ae384e80413ba3cdf46c (patch)
tree52ea61f88167a2e7eacc8fa5ff0ee39ee25b2e7e /src/gui/NewSubpatchWindow.cpp
parent8feac4ed0e764c677d4d208377e956c6db94d2dd (diff)
downloadingen-c11ecf0fd10641218326ae384e80413ba3cdf46c.tar.gz
ingen-c11ecf0fd10641218326ae384e80413ba3cdf46c.tar.bz2
ingen-c11ecf0fd10641218326ae384e80413ba3cdf46c.zip
Remove 'new_patch', 'new_node', and 'new_port' from interface in favour of generic 'put'.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2011 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/NewSubpatchWindow.cpp')
-rw-r--r--src/gui/NewSubpatchWindow.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/NewSubpatchWindow.cpp b/src/gui/NewSubpatchWindow.cpp
index 82b80a05..46663f2c 100644
--- a/src/gui/NewSubpatchWindow.cpp
+++ b/src/gui/NewSubpatchWindow.cpp
@@ -91,10 +91,14 @@ NewSubpatchWindow::name_changed()
void
NewSubpatchWindow::ok_clicked()
{
- const Path path = _patch->path().base() + Path::nameify(_name_entry->get_text());
+ const Path path = _patch->path().base() + Path::nameify(_name_entry->get_text());
const uint32_t poly = _poly_spinbutton->get_value_as_int();
- App::instance().engine()->new_patch(path, poly);
+ Resource::Properties props;
+ props.insert(make_pair("rdf:type", Atom(Atom::URI, "ingen:Patch")));
+ props.insert(make_pair("ingen:polyphony", Atom(int32_t(poly))));
+ App::instance().engine()->put(path, props);
+
for (GraphObject::Properties::const_iterator i = _initial_data.begin(); i != _initial_data.end(); ++i)
App::instance().engine()->set_variable(path, i->first, i->second);