From 03aa3b084fe3d97f62b67867085c04a23402397e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 22 Jun 2006 08:03:12 +0000 Subject: More port controls fixes/cleanups git-svn-id: http://svn.drobilla.net/lad/ingen@78 a436a847-0d15-0410-975c-d299462d15a1 --- src/progs/ingenuity/PortController.cpp | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) (limited to 'src/progs/ingenuity/PortController.cpp') diff --git a/src/progs/ingenuity/PortController.cpp b/src/progs/ingenuity/PortController.cpp index 941e9a72..1646f5b2 100644 --- a/src/progs/ingenuity/PortController.cpp +++ b/src/progs/ingenuity/PortController.cpp @@ -28,8 +28,8 @@ namespace OmGtk { PortController::PortController(CountedPtr model) : GtkObjectController(model), m_module(NULL), - m_port(NULL), - m_control_panel(NULL) + m_port(NULL) + //m_control_panel(NULL) { assert(model); assert(model->parent()); @@ -60,8 +60,8 @@ PortController::destroy() NodeController* parent = (NodeController*)m_model->parent()->controller(); assert(parent != NULL); - if (m_control_panel != NULL) - m_control_panel->remove_port(path()); + //if (m_control_panel != NULL) + // m_control_panel->remove_port(path()); parent->remove_port(path(), false); } @@ -91,6 +91,8 @@ PortController::metadata_update(const string& key, const string& value) //cerr << path() << ": " << key << " = " << value << endl; +/* Panel now listens to model signals.. + if (key == "user-min") { port_model()->user_min(atof(value.c_str())); if (m_control_panel != NULL) @@ -100,6 +102,8 @@ PortController::metadata_update(const string& key, const string& value) if (m_control_panel != NULL) m_control_panel->set_range_max(m_model->path(), atof(value.c_str())); } +*/ + cerr << "FIXME: PortController::metadata_update" << endl; if (m_module != NULL) { if (key == "module-x") { @@ -117,30 +121,19 @@ PortController::metadata_update(const string& key, const string& value) } -void -PortController::control_change(float value) -{ - // FIXME: double lookups - - port_model()->value(value); - - if (m_control_panel != NULL) - m_control_panel->set_control(port_model()->path(), value); -} - - /** "Register" a control panel that is monitoring this port. * * The OmPort will handle notifying the ControlPanel when state * changes occur, etc. */ +/* void PortController::set_control_panel(ControlPanel* cp) { assert(m_control_panel == NULL); m_control_panel = cp; } - +*/ void PortController::set_path(const Path& new_path) @@ -149,8 +142,8 @@ PortController::set_path(const Path& new_path) if (m_port != NULL) m_port->set_name(new_path.name()); - if (m_control_panel != NULL) - m_control_panel->rename_port(m_model->path(), new_path); + //if (m_control_panel != NULL) + // m_control_panel->rename_port(m_model->path(), new_path); m_model->set_path(new_path); } -- cgit v1.2.1