summaryrefslogtreecommitdiffstats
path: root/src/gui/Port.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-13 04:05:32 +0000
committerDavid Robillard <d@drobilla.net>2009-05-13 04:05:32 +0000
commit19928bb583e72802746b89e322f71ecc0fcb7427 (patch)
tree95912dc84d8c9dcf57939398514feaf148c1cd63 /src/gui/Port.cpp
parent96f839e64de70a23210847e322d24690299287fe (diff)
downloadingen-19928bb583e72802746b89e322f71ecc0fcb7427.tar.gz
ingen-19928bb583e72802746b89e322f71ecc0fcb7427.tar.bz2
ingen-19928bb583e72802746b89e322f71ecc0fcb7427.zip
The great ID refactoring of 2009.
Path is now actually URI (scheme path: for now). Therefore ingen nodes and such live in the same namespace as ... well, everything. Including plugins. Thar be profit, laddies. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1992 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/Port.cpp')
-rw-r--r--src/gui/Port.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index c819a957..922dea77 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -29,6 +29,7 @@
using namespace Ingen::Client;
using namespace std;
+using namespace Raul;
namespace Ingen {
namespace GUI {
@@ -136,14 +137,17 @@ Port::set_control(float value, bool signal)
void
-Port::variable_changed(const string& key, const Atom& value)
+Port::variable_changed(const URI& key, const Atom& value)
{
- if ( (key == "lv2:minimum") && value.type() == Atom::FLOAT)
- set_control_min(value.get_float());
- else if ( (key == "lv2:maximum") && value.type() == Atom::FLOAT)
- set_control_max(value.get_float());
- else if ( (key == "lv2:toggled") && value.type() == Atom::BOOL)
- set_toggled(value.get_bool());
+ if (value.type() == Atom::FLOAT) {
+ if ((key.str() == "lv2:minimum"))
+ set_control_min(value.get_float());
+ else if ((key.str() == "lv2:maximum"))
+ set_control_max(value.get_float());
+ } else if (value.type() == Atom::BOOL) {
+ if ((key.str() == "lv2:toggled"))
+ set_toggled(value.get_bool());
+ }
}