summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-07-30 01:19:27 +0000
committerDavid Robillard <d@drobilla.net>2008-07-30 01:19:27 +0000
commit2fa588b481e717e823e4b049d0e65b8e99e45628 (patch)
tree2209c873826f6adbf135aa30892c0650da365d1a
parent92e80a6a2e161e6fc5e31c5ac62af3e2d90136e7 (diff)
downloadingen-2fa588b481e717e823e4b049d0e65b8e99e45628.tar.gz
ingen-2fa588b481e717e823e4b049d0e65b8e99e45628.tar.bz2
ingen-2fa588b481e717e823e4b049d0e65b8e99e45628.zip
Allow loading multiple subpatches at once (in Load Patch dialog from context menu).
git-svn-id: http://svn.drobilla.net/lad/ingen@1311 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/libs/gui/LoadSubpatchWindow.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/libs/gui/LoadSubpatchWindow.cpp b/src/libs/gui/LoadSubpatchWindow.cpp
index 2fdbf094..f637409e 100644
--- a/src/libs/gui/LoadSubpatchWindow.cpp
+++ b/src/libs/gui/LoadSubpatchWindow.cpp
@@ -60,6 +60,8 @@ LoadSubpatchWindow::LoadSubpatchWindow(BaseObjectType* cobject, const Glib::RefP
filt.add_pattern("*.ingen.ttl");
filt.set_name("Ingen patch files (RDF, *.ingen.ttl)");
set_filter(filt);
+
+ property_select_multiple() = true;
// Add global examples directory to "shortcut folders" (bookmarks)
string examples_dir = PKGDATADIR;
@@ -158,8 +160,16 @@ LoadSubpatchWindow::ok_clicked()
_initial_data.insert(make_pair("ingen:polyphony", (int)_patch->poly()));
}
- App::instance().loader()->load_patch(false, get_uri(), "/",
- _initial_data, _patch->path(), name);
+ std::list<Glib::ustring> uris = get_uris();
+ for (std::list<Glib::ustring>::iterator i = uris.begin(); i != uris.end(); ++i) {
+ // Cascade
+ Atom& x = _initial_data["ingenuity:canvas-x"];
+ x = Atom(x.get_float() + 20.0f);
+ Atom& y = _initial_data["ingenuity:canvas-y"];
+ y = Atom(y.get_float() + 20.0f);
+
+ App::instance().loader()->load_patch(false, *i, "/", _initial_data, _patch->path(), name);
+ }
hide();
}