diff options
author | David Robillard <d@drobilla.net> | 2009-05-27 17:42:51 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-05-27 17:42:51 +0000 |
commit | c11ecf0fd10641218326ae384e80413ba3cdf46c (patch) | |
tree | 52ea61f88167a2e7eacc8fa5ff0ee39ee25b2e7e /src/gui/PatchPortModule.cpp | |
parent | 8feac4ed0e764c677d4d208377e956c6db94d2dd (diff) | |
download | ingen-c11ecf0fd10641218326ae384e80413ba3cdf46c.tar.gz ingen-c11ecf0fd10641218326ae384e80413ba3cdf46c.tar.bz2 ingen-c11ecf0fd10641218326ae384e80413ba3cdf46c.zip |
Remove 'new_patch', 'new_node', and 'new_port' from interface in favour of generic 'put'.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2011 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/PatchPortModule.cpp')
-rw-r--r-- | src/gui/PatchPortModule.cpp | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/src/gui/PatchPortModule.cpp b/src/gui/PatchPortModule.cpp index 0b88746c..09b7dd4a 100644 --- a/src/gui/PatchPortModule.cpp +++ b/src/gui/PatchPortModule.cpp @@ -48,7 +48,7 @@ PatchPortModule::PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPt set_stacked_border(model->polyphonic()); - model->signal_variable.connect(sigc::mem_fun(this, &PatchPortModule::set_variable)); + model->signal_variable.connect(sigc::mem_fun(this, &PatchPortModule::set_property)); model->signal_property.connect(sigc::mem_fun(this, &PatchPortModule::set_property)); } @@ -65,7 +65,7 @@ PatchPortModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortMod for (GraphObject::Properties::const_iterator m = model->variables().begin(); m != model->variables().end(); ++m) - ret->set_variable(m->first, m->second); + ret->set_property(m->first, m->second); for (GraphObject::Properties::const_iterator m = model->properties().begin(); m != model->properties().end(); ++m) @@ -132,24 +132,6 @@ PatchPortModule::set_name(const std::string& n) void -PatchPortModule::set_variable(const URI& key, const Atom& value) -{ - if (value.type() == Atom::BOOL) { - if (key.str() == "ingen:polyphonic") { - set_stacked_border(value.get_bool()); - } else if (key.str() == "ingen:selected") { - if (value.get_bool() != selected()) { - if (value.get_bool()) - _canvas.lock()->select_item(shared_from_this()); - else - _canvas.lock()->unselect_item(shared_from_this()); - } - } - } -} - - -void PatchPortModule::set_property(const URI& key, const Atom& value) { switch (value.type()) { @@ -166,6 +148,18 @@ PatchPortModule::set_property(const URI& key, const Atom& value) } else if (key.str() == "lv2:symbol" && !_human_name_visible) { set_name(value.get_string()); } + case Atom::BOOL: + if (key.str() == "ingen:polyphonic") { + set_stacked_border(value.get_bool()); + } else if (key.str() == "ingen:selected") { + if (value.get_bool() != selected()) { + if (value.get_bool()) { + _canvas.lock()->select_item(shared_from_this()); + } else { + _canvas.lock()->unselect_item(shared_from_this()); + } + } + } default: break; } } |