summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-09-17 01:07:57 +0000
committerDavid Robillard <d@drobilla.net>2006-09-17 01:07:57 +0000
commit939df9ccddc7b2396b2164fb385e258cbda5b51b (patch)
treecf8f126c824e3615ac416e577a7b8bd158a23551 /src
parentd6f735d9509af6d0d9c79bda10d7c5e6cbc10562 (diff)
downloadingen-939df9ccddc7b2396b2164fb385e258cbda5b51b.tar.gz
ingen-939df9ccddc7b2396b2164fb385e258cbda5b51b.tar.bz2
ingen-939df9ccddc7b2396b2164fb385e258cbda5b51b.zip
Patch tree window fixes.
git-svn-id: http://svn.drobilla.net/lad/ingen@140 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/progs/ingenuity/App.cpp2
-rw-r--r--src/progs/ingenuity/NewSubpatchWindow.cpp1
-rw-r--r--src/progs/ingenuity/PatchTreeWindow.cpp12
3 files changed, 9 insertions, 6 deletions
diff --git a/src/progs/ingenuity/App.cpp b/src/progs/ingenuity/App.cpp
index 78d2e971..a4b820d1 100644
--- a/src/progs/ingenuity/App.cpp
+++ b/src/progs/ingenuity/App.cpp
@@ -101,6 +101,8 @@ App::attach(const CountedPtr<ModelEngineInterface>& engine, const CountedPtr<Sig
_client = client;
_store = new Store(client);
_loader = new Loader(engine);
+
+ _patch_tree_window->init(*_store);
}
diff --git a/src/progs/ingenuity/NewSubpatchWindow.cpp b/src/progs/ingenuity/NewSubpatchWindow.cpp
index 44da3a4e..a74dc2b0 100644
--- a/src/progs/ingenuity/NewSubpatchWindow.cpp
+++ b/src/progs/ingenuity/NewSubpatchWindow.cpp
@@ -89,6 +89,7 @@ NewSubpatchWindow::ok_clicked()
const size_t poly = m_poly_spinbutton->get_value_as_int();
App::instance().engine()->create_patch_with_data(path, poly, m_initial_data);
+ App::instance().engine()->enable_patch(path);
hide();
}
diff --git a/src/progs/ingenuity/PatchTreeWindow.cpp b/src/progs/ingenuity/PatchTreeWindow.cpp
index 40ce5baf..00aa324f 100644
--- a/src/progs/ingenuity/PatchTreeWindow.cpp
+++ b/src/progs/ingenuity/PatchTreeWindow.cpp
@@ -113,6 +113,9 @@ PatchTreeWindow::add_patch(CountedPtr<PatchModel> pm)
m_patches_treeview->expand_row(m_patch_treestore->get_path(iter), true);
}
}
+
+ pm->enabled_sig.connect(sigc::bind(sigc::mem_fun(this, &PatchTreeWindow::patch_enabled), pm->path()));
+ pm->disabled_sig.connect(sigc::bind(sigc::mem_fun(this, &PatchTreeWindow::patch_disabled), pm->path()));
}
@@ -177,8 +180,7 @@ PatchTreeWindow::event_patch_activated(const Gtk::TreeModel::Path& path, Gtk::Tr
Gtk::TreeModel::Row row = *active;
CountedPtr<PatchModel> pm = row[m_patch_tree_columns.patch_model_col];
- cerr << "FIXME: tree win show\n";
- //App::instance().window_factory()->present(pc);
+ App::instance().window_factory()->present_patch(pm);
}
@@ -197,13 +199,11 @@ PatchTreeWindow::event_patch_enabled_toggled(const Glib::ustring& path_str)
if ( ! pm->enabled()) {
if (m_enable_signal)
App::instance().engine()->enable_patch(patch_path);
- //pc->enable();
- row[m_patch_tree_columns.enabled_col] = true;
+ //row[m_patch_tree_columns.enabled_col] = true;
} else {
if (m_enable_signal)
App::instance().engine()->disable_patch(patch_path);
- //pc->disable();
- row[m_patch_tree_columns.enabled_col] = false;
+ //row[m_patch_tree_columns.enabled_col] = false;
}
}