Patch tree window fixes.

git-svn-id: http://svn.drobilla.net/lad@140 a436a847-0d15-0410-975c-d299462d15a1
This commit is contained in:
dave 2006-09-17 01:07:57 +00:00
parent 9f1d0d1d66
commit 5354222fbc
3 changed files with 9 additions and 6 deletions

View File

@ -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);
}

View File

@ -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();
}

View File

@ -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;
}
}