diff options
Diffstat (limited to 'src/gui/ControlPanel.cpp')
-rw-r--r-- | src/gui/ControlPanel.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/gui/ControlPanel.cpp b/src/gui/ControlPanel.cpp index eda1adc0..c0f6d19f 100644 --- a/src/gui/ControlPanel.cpp +++ b/src/gui/ControlPanel.cpp @@ -16,6 +16,7 @@ */ #include "interface/EngineInterface.hpp" +#include "interface/PortType.hpp" #include "shared/LV2URIMap.hpp" #include "client/NodeModel.hpp" #include "client/PortModel.hpp" @@ -89,21 +90,19 @@ ControlPanel::add_port(SharedPtr<PortModel> pm) // Add port if (pm->is_input()) { - if (pm->type().is_control()) { - if (pm->is_toggle()) { - ToggleControl* tc; - Glib::RefPtr<Gnome::Glade::Xml> xml - = GladeFactory::new_glade_reference("toggle_control"); - xml->get_widget_derived("toggle_control", tc); - control = tc; - } else { - SliderControl* sc; - Glib::RefPtr<Gnome::Glade::Xml> xml - = GladeFactory::new_glade_reference("control_strip"); - xml->get_widget_derived("control_strip", sc); - control = sc; - } - } else if (pm->type().is_value() || pm->type().is_message()) { + if (pm->is_toggle()) { + ToggleControl* tc; + Glib::RefPtr<Gnome::Glade::Xml> xml + = GladeFactory::new_glade_reference("toggle_control"); + xml->get_widget_derived("toggle_control", tc); + control = tc; + } else if (pm->supports(App::instance().uris().object_class_float32)) { + SliderControl* sc; + Glib::RefPtr<Gnome::Glade::Xml> xml + = GladeFactory::new_glade_reference("control_strip"); + xml->get_widget_derived("control_strip", sc); + control = sc; + } else if (pm->supports(App::instance().uris().object_class_string)) { StringControl* sc; Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference("string_control"); |