summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity/NewSubpatchWindow.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-09-14 06:30:26 +0000
committerDavid Robillard <d@drobilla.net>2006-09-14 06:30:26 +0000
commita100c20612fc4f7f30372f579e355f782befa7e2 (patch)
treed8bfe1e2f21cf6ff0bc27b040492d2b25a6291ea /src/progs/ingenuity/NewSubpatchWindow.cpp
parentcc384f6f622cc10fd83616256080b80dc2123aaf (diff)
downloadingen-a100c20612fc4f7f30372f579e355f782befa7e2.tar.gz
ingen-a100c20612fc4f7f30372f579e355f782befa7e2.tar.bz2
ingen-a100c20612fc4f7f30372f579e355f782befa7e2.zip
Bug fixes.
git-svn-id: http://svn.drobilla.net/lad/ingen@134 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/ingenuity/NewSubpatchWindow.cpp')
-rw-r--r--src/progs/ingenuity/NewSubpatchWindow.cpp27
1 files changed, 6 insertions, 21 deletions
diff --git a/src/progs/ingenuity/NewSubpatchWindow.cpp b/src/progs/ingenuity/NewSubpatchWindow.cpp
index 1d730582..44da3a4e 100644
--- a/src/progs/ingenuity/NewSubpatchWindow.cpp
+++ b/src/progs/ingenuity/NewSubpatchWindow.cpp
@@ -25,9 +25,7 @@ namespace Ingenuity {
NewSubpatchWindow::NewSubpatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
-: Gtk::Window(cobject),
- m_new_module_x(0),
- m_new_module_y(0)
+: Gtk::Window(cobject)
{
xml->get_widget("new_subpatch_name_entry", m_name_entry);
xml->get_widget("new_subpatch_message_label", m_message_label);
@@ -87,24 +85,11 @@ NewSubpatchWindow::name_changed()
void
NewSubpatchWindow::ok_clicked()
{
- cerr << "FIXME: new subpatch\n";
-#if 0
- PatchModel* pm = new PatchModel(
- m_patch->path().base() + m_name_entry->get_text(),
- m_poly_spinbutton->get_value_as_int());
-
- if (m_new_module_x == 0 && m_new_module_y == 0) {
- throw; // FIXME
- //m_patch_controller->get_view()->canvas()->get_new_module_location(
- // m_new_module_x, m_new_module_y);
- }
-
- // FIXME: necessary?
- //pm->set_parent(m_patch);
- pm->set_metadata("module-x", (float)m_new_module_x);
- pm->set_metadata("module-y", (float)m_new_module_y);
- App::instance().engine()->create_patch_from_model(pm);
-#endif
+ const Path path = m_patch->path().base() + Path::nameify(m_name_entry->get_text());
+ const size_t poly = m_poly_spinbutton->get_value_as_int();
+
+ App::instance().engine()->create_patch_with_data(path, poly, m_initial_data);
+
hide();
}