From 55c6e4c46d388189e35329a6519b9afa86f029fa Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 15 Jun 2006 08:22:48 +0000 Subject: Switched patch "description" window into a properties window (hopefully to extend in the future) git-svn-id: http://svn.drobilla.net/lad/grauph@40 a436a847-0d15-0410-975c-d299462d15a1 --- src/progs/gtk/PatchWindow.cpp | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'src/progs/gtk/PatchWindow.cpp') diff --git a/src/progs/gtk/PatchWindow.cpp b/src/progs/gtk/PatchWindow.cpp index 9387257f..8211e653 100644 --- a/src/progs/gtk/PatchWindow.cpp +++ b/src/progs/gtk/PatchWindow.cpp @@ -28,7 +28,7 @@ #include "LoadPatchWindow.h" #include "LoadSubpatchWindow.h" #include "NodeControlWindow.h" -#include "PatchDescriptionWindow.h" +#include "PatchPropertiesWindow.h" #include "ConfigWindow.h" #include "MessagesWindow.h" #include "PatchTreeWindow.h" @@ -79,13 +79,11 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtrget_widget_derived("new_subpatch_win", m_new_subpatch_window); xml->get_widget_derived("load_patch_win", m_load_patch_window); xml->get_widget_derived("load_subpatch_win", m_load_subpatch_window); - xml->get_widget_derived("patch_description_win", m_description_window); //m_load_plugin_window->set_transient_for(*this); m_new_subpatch_window->set_transient_for(*this); m_load_patch_window->set_transient_for(*this); m_load_subpatch_window->set_transient_for(*this); - m_description_window->set_transient_for(*this); m_menu_view_control_window->property_sensitive() = false; //m_status_bar->push(Controller::instance().engine_url()); @@ -110,9 +108,9 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtrsignal_toggled().connect( sigc::mem_fun(this, &PatchWindow::event_fullscreen_toggled)); m_menu_view_control_window->signal_activate().connect( - sigc::mem_fun(this, &PatchWindow::show_control_window)); + sigc::mem_fun(this, &PatchWindow::event_show_controls)); m_menu_view_patch_description->signal_activate().connect( - sigc::mem_fun(this, &PatchWindow::show_description_window)); + sigc::mem_fun(this, &PatchWindow::event_show_properties)); m_menu_destroy_patch->signal_activate().connect( sigc::mem_fun(this, &PatchWindow::event_destroy)); m_menu_clear->signal_activate().connect( @@ -201,7 +199,7 @@ PatchWindow::patch_controller(PatchController* pc) set_title(m_patch->model()->path()); - m_description_window->patch_model(pc->patch_model()); + //m_properties_window->patch_model(pc->patch_model()); // Setup breadcrumbs box @@ -283,10 +281,11 @@ PatchWindow::rebuild_breadcrumbs() void PatchWindow::breadcrumb_clicked(BreadCrumb* crumb) { - cerr << "FIXME: crumb\n"; - /* if (m_enable_signal) { - PatchController* const pc = crumb->patch(); + // FIXME: check to be sure PatchModel exists, then controller - maybe + // even make a controller if there isn't one? + PatchController* const pc = dynamic_cast( + Store::instance().patch(crumb->path())->controller()); assert(pc != NULL); if (pc == m_patch) { @@ -298,22 +297,22 @@ PatchWindow::breadcrumb_clicked(BreadCrumb* crumb) patch_controller(pc); } } - */ } void -PatchWindow::show_control_window() +PatchWindow::event_show_controls() { - if (m_patch != NULL) + if (m_patch) m_patch->show_control_window(); } void -PatchWindow::show_description_window() +PatchWindow::event_show_properties() { - m_description_window->show(); + if (m_patch) + m_patch->show_properties_window(); } -- cgit v1.2.1