summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-11 05:22:08 +0000
committerDavid Robillard <d@drobilla.net>2012-03-11 05:22:08 +0000
commit4c299323440923891b9c583a354116000eb143cc (patch)
treef2873fdd9849561608b7eebbfad89c04d56ba58e /src/gui
parentc2ea4e3c59ce8c06066780d67237fdb07255c89e (diff)
downloadingen-4c299323440923891b9c583a354116000eb143cc.tar.gz
ingen-4c299323440923891b9c583a354116000eb143cc.tar.bz2
ingen-4c299323440923891b9c583a354116000eb143cc.zip
Implement cv:CVPort (fix #790). Not well-tested, but at least works somewhat.
Use new style LV2 URI defines (and fix invalid atom URIs). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4050 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/App.cpp3
-rw-r--r--src/gui/ControlPanel.cpp3
-rw-r--r--src/gui/PatchCanvas.cpp8
3 files changed, 8 insertions, 6 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index 448f3903..5a42af53 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -390,8 +390,9 @@ bool
App::can_control(const Client::PortModel* port) const
{
return port->is_a(uris().lv2_ControlPort)
+ || port->is_a(uris().cv_CVPort)
|| (port->is_a(uris().atom_ValuePort)
- && (port->supports(uris().atom_Float32)
+ && (port->supports(uris().atom_Float)
|| port->supports(uris().atom_String)));
}
diff --git a/src/gui/ControlPanel.cpp b/src/gui/ControlPanel.cpp
index 6b3c180d..3c02d2d9 100644
--- a/src/gui/ControlPanel.cpp
+++ b/src/gui/ControlPanel.cpp
@@ -93,7 +93,8 @@ ControlPanel::add_port(SharedPtr<const PortModel> pm)
WidgetFactory::get_widget_derived("toggle_control", tc);
control = tc;
} else if (pm->is_a(_app->uris().lv2_ControlPort)
- || pm->supports(_app->uris().atom_Float32)) {
+ || pm->is_a(_app->uris().cv_CVPort)
+ || pm->supports(_app->uris().atom_Float)) {
SliderControl* sc;
WidgetFactory::get_widget_derived("control_strip", sc);
control = sc;
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp
index 0c6d73fa..6690e93f 100644
--- a/src/gui/PatchCanvas.cpp
+++ b/src/gui/PatchCanvas.cpp
@@ -96,16 +96,16 @@ PatchCanvas::PatchCanvas(App& app,
// Add port menu items
_menu_add_audio_input->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
- "audio_in", "Audio In", "http://lv2plug.in/ns/lv2core#AudioPort", false));
+ "audio_in", "Audio In", LV2_CORE__AudioPort, false));
_menu_add_audio_output->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
- "audio_out", "Audio Out", "http://lv2plug.in/ns/lv2core#AudioPort", true));
+ "audio_out", "Audio Out", LV2_CORE__AudioPort, true));
_menu_add_control_input->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
- "control_in", "Control In", "http://lv2plug.in/ns/lv2core#ControlPort", false));
+ "control_in", "Control In", LV2_CORE__ControlPort, false));
_menu_add_control_output->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
- "control_out", "Control Out", "http://lv2plug.in/ns/lv2core#ControlPort", true));
+ "control_out", "Control Out", LV2_CORE__ControlPort, true));
_menu_add_event_input->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
"event_in", "Event In", "http://lv2plug.in/ns/ext/event#EventPort", false));