diff options
author | David Robillard <d@drobilla.net> | 2007-10-08 00:50:13 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-10-08 00:50:13 +0000 |
commit | a421a44310ee472fbee15f150d32b826a8371dbf (patch) | |
tree | d160bb1704a26524dee8746e3f7dd69494460cd6 /src/libs/gui | |
parent | 19a9eb15d1c918b10fe169db1b8f4fd0c6ffe8fa (diff) | |
download | ingen-a421a44310ee472fbee15f150d32b826a8371dbf.tar.gz ingen-a421a44310ee472fbee15f150d32b826a8371dbf.tar.bz2 ingen-a421a44310ee472fbee15f150d32b826a8371dbf.zip |
Fix serialization/connection bugs resulting from refactoring.
git-svn-id: http://svn.drobilla.net/lad/ingen@842 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/gui')
-rw-r--r-- | src/libs/gui/App.cpp | 1 | ||||
-rw-r--r-- | src/libs/gui/Configuration.cpp | 14 | ||||
-rw-r--r-- | src/libs/gui/ControlPanel.cpp | 2 | ||||
-rw-r--r-- | src/libs/gui/NodeControlWindow.cpp | 2 | ||||
-rw-r--r-- | src/libs/gui/NodeMenu.cpp | 2 | ||||
-rw-r--r-- | src/libs/gui/NodeModule.cpp | 6 | ||||
-rw-r--r-- | src/libs/gui/PatchCanvas.cpp | 2 | ||||
-rw-r--r-- | src/libs/gui/PatchWindow.cpp | 8 | ||||
-rw-r--r-- | src/libs/gui/Port.cpp | 2 | ||||
-rw-r--r-- | src/libs/gui/Port.hpp | 6 |
10 files changed, 23 insertions, 22 deletions
diff --git a/src/libs/gui/App.cpp b/src/libs/gui/App.cpp index 8c7c365c..255af745 100644 --- a/src/libs/gui/App.cpp +++ b/src/libs/gui/App.cpp @@ -41,6 +41,7 @@ #include "ConnectWindow.hpp" #include "ThreadedLoader.hpp" #include "WindowFactory.hpp" +#include "Port.hpp" /*#ifdef HAVE_LASH #include "LashController.hpp" #endif*/ diff --git a/src/libs/gui/Configuration.cpp b/src/libs/gui/Configuration.cpp index f4c00545..e5b4fbd3 100644 --- a/src/libs/gui/Configuration.cpp +++ b/src/libs/gui/Configuration.cpp @@ -87,20 +87,20 @@ Configuration::get_port_color(const PortModel* p) { assert(p != NULL); - if (p->is_control()) { + if (p->type().is_control()) { return _control_port_color; - } else if (p->is_audio()) { + } else if (p->type().is_audio()) { return _audio_port_color; - } else if (p->is_midi()) { + } else if (p->type().is_midi()) { return _midi_port_color; - } else if (p->is_osc()) { + } else if (p->type().is_osc()) { return _osc_port_color; } - cerr << "[Configuration] Unknown port type " << p->type() << ", port will appear bright red." - << endl; + cerr << "[Configuration] Unknown port type " << p->type().uri() + << ", port will appear black." << endl; - return 0xFF0000B0; + return 0x000000FF; } diff --git a/src/libs/gui/ControlPanel.cpp b/src/libs/gui/ControlPanel.cpp index bef5e18b..422a4614 100644 --- a/src/libs/gui/ControlPanel.cpp +++ b/src/libs/gui/ControlPanel.cpp @@ -107,7 +107,7 @@ ControlPanel::add_port(SharedPtr<PortModel> pm) return; // Add port - if (pm->is_control() && pm->is_input()) { + if (pm->type().is_control() && pm->is_input()) { SliderControlGroup* cg = NULL; #if 0 if (pm->is_integer()) diff --git a/src/libs/gui/NodeControlWindow.cpp b/src/libs/gui/NodeControlWindow.cpp index 853a15bb..cfa22b10 100644 --- a/src/libs/gui/NodeControlWindow.cpp +++ b/src/libs/gui/NodeControlWindow.cpp @@ -114,7 +114,7 @@ NodeControlWindow::on_show() { for (PortModelList::const_iterator i = _node->ports().begin(); i != _node->ports().end(); ++i) - if ((*i)->is_control() && (*i)->is_input()) + if ((*i)->type().is_control() && (*i)->is_input()) App::instance().engine()->request_port_value((*i)->path()); if (_position_stored) diff --git a/src/libs/gui/NodeMenu.cpp b/src/libs/gui/NodeMenu.cpp index bd82fcca..cbb4c0df 100644 --- a/src/libs/gui/NodeMenu.cpp +++ b/src/libs/gui/NodeMenu.cpp @@ -131,7 +131,7 @@ NodeMenu::has_control_inputs() { const NodeModel* const nm = (NodeModel*)_object.get(); for (PortModelList::const_iterator i = nm->ports().begin(); i != nm->ports().end(); ++i) - if ((*i)->is_input() && (*i)->is_control()) + if ((*i)->is_input() && (*i)->type().is_control()) return true; return false; diff --git a/src/libs/gui/NodeModule.cpp b/src/libs/gui/NodeModule.cpp index 875a6d8c..b4309dfa 100644 --- a/src/libs/gui/NodeModule.cpp +++ b/src/libs/gui/NodeModule.cpp @@ -177,7 +177,7 @@ NodeModule::embed_gui(bool embed) sigc::mem_fun(this, &NodeModule::gui_size_request), false)); for (PortModelList::const_iterator p = _node->ports().begin(); p != _node->ports().end(); ++p) - if ((*p)->is_control() && (*p)->is_output()) + if ((*p)->type().is_control() && (*p)->is_output()) App::instance().engine()->enable_port_broadcasting((*p)->path()); } else { @@ -198,7 +198,7 @@ NodeModule::embed_gui(bool embed) _minimum_width = 0; // resize() takes care of it.. for (PortModelList::const_iterator p = _node->ports().begin(); p != _node->ports().end(); ++p) - if ((*p)->is_control() && (*p)->is_output()) + if ((*p)->type().is_control() && (*p)->is_output()) App::instance().engine()->disable_port_broadcasting((*p)->path()); } @@ -314,7 +314,7 @@ NodeModule::initialise_gui_values() { uint32_t index=0; for (PortModelList::const_iterator p = _node->ports().begin(); p != _node->ports().end(); ++p) { - if ((*p)->is_control()) + if ((*p)->type().is_control()) control_change(index, (*p)->value()); ++index; } diff --git a/src/libs/gui/PatchCanvas.cpp b/src/libs/gui/PatchCanvas.cpp index 5e3c7f78..e2e176cb 100644 --- a/src/libs/gui/PatchCanvas.cpp +++ b/src/libs/gui/PatchCanvas.cpp @@ -346,7 +346,7 @@ PatchCanvas::connect(boost::shared_ptr<FlowCanvas::Connectable> src_port, return; // Midi binding/learn shortcut - if (src->model()->is_midi() && dst->model()->is_control()) + if (src->model()->type().is_midi() && dst->model()->type().is_control()) { cerr << "[PatchCanvas] FIXME: MIDI binding shortcut" << endl; #if 0 diff --git a/src/libs/gui/PatchWindow.cpp b/src/libs/gui/PatchWindow.cpp index 6260221d..3566d83d 100644 --- a/src/libs/gui/PatchWindow.cpp +++ b/src/libs/gui/PatchWindow.cpp @@ -207,7 +207,7 @@ PatchWindow::set_patch(SharedPtr<PatchModel> patch, SharedPtr<PatchView> view) for (PortModelList::const_iterator p = patch->ports().begin(); p != patch->ports().end(); ++p) { - if ((*p)->is_control() && (*p)->is_input()) { + if ((*p)->type().is_control() && (*p)->is_input()) { _menu_view_control_window->property_sensitive() = true; break; } @@ -239,7 +239,7 @@ PatchWindow::set_patch(SharedPtr<PatchModel> patch, SharedPtr<PatchView> view) void PatchWindow::patch_port_added(SharedPtr<PortModel> port) { - if (port->is_control() && port->is_input()) { + if (port->type().is_control() && port->is_input()) { _menu_view_control_window->property_sensitive() = true; } } @@ -248,12 +248,12 @@ PatchWindow::patch_port_added(SharedPtr<PortModel> port) void PatchWindow::patch_port_removed(SharedPtr<PortModel> port) { - if (port->is_control() && port->is_input()) { + if (port->type().is_control() && port->is_input()) { bool found_control = false; for (PortModelList::const_iterator i = _patch->ports().begin(); i != _patch->ports().end(); ++i) { - if ((*i)->is_control() && (*i)->is_input()) { + if ((*i)->type().is_control() && (*i)->is_input()) { found_control = true; break; } diff --git a/src/libs/gui/Port.cpp b/src/libs/gui/Port.cpp index ccd9652c..e3dd0fd4 100644 --- a/src/libs/gui/Port.cpp +++ b/src/libs/gui/Port.cpp @@ -51,7 +51,7 @@ Port::Port(boost::shared_ptr<FlowCanvas::Module> module, SharedPtr<PortModel> pm _port_model->signal_renamed.connect(sigc::mem_fun(this, &Port::renamed)); - if (pm->is_control()) { + if (pm->type().is_control()) { show_control(); float min = 0.0f, max = 1.0f; diff --git a/src/libs/gui/Port.hpp b/src/libs/gui/Port.hpp index e381c59b..dbbf64d3 100644 --- a/src/libs/gui/Port.hpp +++ b/src/libs/gui/Port.hpp @@ -15,8 +15,8 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PORT_H -#define PORT_H +#ifndef GUI_PORT_H +#define GUI_PORT_H #include <cassert> #include <string> @@ -63,4 +63,4 @@ private: } // namespace GUI } // namespace Ingen -#endif // PORT_H +#endif // GUI_PORT_H |