summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-28 14:58:02 +0000
committerDavid Robillard <d@drobilla.net>2009-05-28 14:58:02 +0000
commit6617930ccdc4f224fb6c7f4fe670cbd4374c6dae (patch)
tree45449988238d12beca3127f578f40889973994f4 /src
parent57bf41d3d6153f2202fcef50bc618806d2b58104 (diff)
downloadingen-6617930ccdc4f224fb6c7f4fe670cbd4374c6dae.tar.gz
ingen-6617930ccdc4f224fb6c7f4fe670cbd4374c6dae.tar.bz2
ingen-6617930ccdc4f224fb6c7f4fe670cbd4374c6dae.zip
Send port ranges and new subpatches as single PUTs.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2023 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/gui/NewSubpatchWindow.cpp7
-rw-r--r--src/gui/PortPropertiesWindow.cpp9
2 files changed, 7 insertions, 9 deletions
diff --git a/src/gui/NewSubpatchWindow.cpp b/src/gui/NewSubpatchWindow.cpp
index 3c697d81..0442d57b 100644
--- a/src/gui/NewSubpatchWindow.cpp
+++ b/src/gui/NewSubpatchWindow.cpp
@@ -99,10 +99,9 @@ NewSubpatchWindow::ok_clicked()
props.insert(make_pair("ingen:polyphony", Atom(int32_t(poly))));
App::instance().engine()->put(ResourceImpl::meta_uri(Path::root_uri, path), props);
- for (GraphObject::Properties::const_iterator i = _initial_data.begin(); i != _initial_data.end(); ++i)
- App::instance().engine()->set_property(path, i->first, i->second);
-
- App::instance().engine()->set_property(path, "ingen:enabled", (bool)true);
+ props = _initial_data;
+ props.insert(make_pair("ingen:enabled", bool(true)));
+ App::instance().engine()->put(path, props);
hide();
}
diff --git a/src/gui/PortPropertiesWindow.cpp b/src/gui/PortPropertiesWindow.cpp
index 045e8840..3efe02bd 100644
--- a/src/gui/PortPropertiesWindow.cpp
+++ b/src/gui/PortPropertiesWindow.cpp
@@ -155,11 +155,10 @@ PortPropertiesWindow::cancel()
void
PortPropertiesWindow::ok()
{
- const float min = _min_spinner->get_value();
- const float max = _max_spinner->get_value();
-
- App::instance().engine()->set_property(_port_model->meta().uri(), "lv2:minimum", min);
- App::instance().engine()->set_property(_port_model->meta().uri(), "lv2:maximum", max);
+ Shared::Resource::Properties props;
+ props.insert(make_pair("lv2:minimum", float(_min_spinner->get_value())));
+ props.insert(make_pair("lv2:maximum", float(_max_spinner->get_value())));
+ App::instance().engine()->put(_port_model->meta().uri(), props);
hide();
}