summaryrefslogtreecommitdiffstats
path: root/src/gui/ControlPanel.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-11 18:05:24 +0000
committerDavid Robillard <d@drobilla.net>2009-05-11 18:05:24 +0000
commit698c38587bd4f0133a132dc363098ff8298ec47b (patch)
treeabcab2ab196d995fbcc52a4e62c4f5d496b6a754 /src/gui/ControlPanel.cpp
parent9ea901df533b0326e715ced10b9e9970239da515 (diff)
downloadingen-698c38587bd4f0133a132dc363098ff8298ec47b.tar.gz
ingen-698c38587bd4f0133a132dc363098ff8298ec47b.tar.bz2
ingen-698c38587bd4f0133a132dc363098ff8298ec47b.zip
* New ontology.
* Display human names on patch ports on creation, if enabled. * Fix copy/paste of subpatches. * Split properties into "properties" (class properties) and "variables" (instance properties). * Names are kind of a legacy leftover... * Remove special set poly / enable / etc events in favour of just setting properties (less API, extensible, RDF compatible). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1973 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/ControlPanel.cpp')
-rw-r--r--src/gui/ControlPanel.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/gui/ControlPanel.cpp b/src/gui/ControlPanel.cpp
index 87167b3f..0d7feafd 100644
--- a/src/gui/ControlPanel.cpp
+++ b/src/gui/ControlPanel.cpp
@@ -74,12 +74,12 @@ ControlPanel::init(SharedPtr<NodeModel> node, uint32_t poly)
add_port(*i);
}
- node->signal_property.connect(bind(
- sigc::mem_fun(this, &ControlPanel::property_changed), false));
+ node->signal_property.connect(
+ sigc::mem_fun(this, &ControlPanel::variable_changed));
if (node->parent()) {
- node->signal_property.connect(bind(
- sigc::mem_fun(this, &ControlPanel::property_changed), true));
+ node->signal_property.connect(
+ sigc::mem_fun(this, &ControlPanel::parent_property_changed));
} else {
cerr << "[ControlPanel] No parent, polyphonic controls disabled" << endl;
}
@@ -251,15 +251,21 @@ ControlPanel::specific_voice_selected()
void
-ControlPanel::property_changed(const std::string& predicate, const Raul::Atom& value, bool parent)
+ControlPanel::parent_property_changed(const std::string& predicate, const Raul::Atom& value)
{
- if (!parent && predicate == "ingen:polyphonic" && value.type() == Atom::BOOL) {
+ if (predicate == "ingen:polyphony" && value.type() == Atom::INT)
+ _voice_spinbutton->set_range(0, value.get_int32() - 1);
+}
+
+
+void
+ControlPanel::variable_changed(const std::string& predicate, const Raul::Atom& value)
+{
+ if (predicate == "ingen:polyphonic" && value.type() == Atom::BOOL) {
if (value.get_bool())
_voice_control_box->show();
else
_voice_control_box->hide();
- } else if (parent && predicate == "ingen:polyphony" && value.type() == Atom::INT) {
- _voice_spinbutton->set_range(0, value.get_int32() - 1);
}
}