summaryrefslogtreecommitdiffstats
path: root/src/gui/PatchView.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/PatchView.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/PatchView.cpp')
-rw-r--r--src/gui/PatchView.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gui/PatchView.cpp b/src/gui/PatchView.cpp
index c441a64a..911c7c73 100644
--- a/src/gui/PatchView.cpp
+++ b/src/gui/PatchView.cpp
@@ -81,8 +81,13 @@ PatchView::set_patch(SharedPtr<PatchModel> patch)
for (GraphObject::Properties::const_iterator i = patch->properties().begin();
i != patch->properties().end(); ++i)
property_changed(i->first, i->second);
+
+ for (GraphObject::Properties::const_iterator i = patch->variables().begin();
+ i != patch->variables().end(); ++i)
+ variable_changed(i->first, i->second);
// Connect model signals to track state
+ patch->signal_variable.connect(sigc::mem_fun(this, &PatchView::variable_changed));
patch->signal_property.connect(sigc::mem_fun(this, &PatchView::property_changed));
// Connect widget signals to do things
@@ -193,7 +198,7 @@ PatchView::process_toggled()
if (!_enable_signal)
return;
- App::instance().engine()->set_property(_patch->path(), "ingen:enabled",
+ App::instance().engine()->set_variable(_patch->path(), "ingen:enabled",
(bool)_process_but->get_active());
}
@@ -223,12 +228,18 @@ PatchView::refresh_clicked()
void
PatchView::property_changed(const std::string& predicate, const Raul::Atom& value)
{
+}
+
+
+void
+PatchView::variable_changed(const std::string& predicate, const Raul::Atom& value)
+{
_enable_signal = false;
if (predicate == "ingen:enabled") {
if (value.type() == Atom::BOOL)
_process_but->set_active(value.get_bool());
else
- cerr << "WARNING: Bad type for ingen:enabled property: " << value.type() << endl;
+ cerr << "WARNING: Bad type for ingen:enabled variable: " << value.type() << endl;
}
_enable_signal = true;
}