summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}
}