diff options
author | David Robillard <d@drobilla.net> | 2013-02-02 02:16:23 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-02-02 02:16:23 +0000 |
commit | d049b582e1db60ee0f6fd02a40202145488c7288 (patch) | |
tree | 4b30ba2522a14863ce76f672f537dcca0c14c34e /src/server/events | |
parent | 73a01c1bd8d6cf92522a433cd2b0bd491f2af99a (diff) | |
download | ingen-d049b582e1db60ee0f6fd02a40202145488c7288.tar.gz ingen-d049b582e1db60ee0f6fd02a40202145488c7288.tar.bz2 ingen-d049b582e1db60ee0f6fd02a40202145488c7288.zip |
Add option to enable/disable canvas animation (fix/avoid #879).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5016 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events')
-rw-r--r-- | src/server/events/Delta.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp index 9287f9e5..2b851b16 100644 --- a/src/server/events/Delta.cpp +++ b/src/server/events/Delta.cpp @@ -104,6 +104,7 @@ Delta::pre_process() typedef Properties::const_iterator iterator; const bool is_graph_object = Node::uri_is_path(_subject); + const bool is_client = (_subject == "ingen:/clients/this"); // Take a writer lock while we modify the store Glib::RWLock::WriterLock lock(_engine.store()->lock()); @@ -112,7 +113,7 @@ Delta::pre_process() ? static_cast<Ingen::Resource*>(_engine.store()->get(Node::uri_to_path(_subject))) : static_cast<Ingen::Resource*>(_engine.block_factory()->plugin(_subject)); - if (!_object && (!is_graph_object || !_create)) { + if (!_object && !is_client && (!is_graph_object || !_create)) { return Event::pre_process_done(Status::NOT_FOUND, _subject); } @@ -155,7 +156,9 @@ Delta::pre_process() if (port) _old_bindings = _engine.control_bindings()->remove(port); } - _object->remove_property(key, value); + if (_object) { + _object->remove_property(key, value); + } } for (const auto& p : _properties) { @@ -243,6 +246,9 @@ Delta::pre_process() _status = Status::BAD_OBJECT_TYPE; } } + } else if (is_client && key == uris.ingen_broadcast) { + _engine.broadcaster()->set_broadcast( + _request_client->uri(), value.get_bool()); } if (_status != Status::NOT_PREPARED) { @@ -287,7 +293,7 @@ Delta::execute(ProcessContext& context) switch (*t) { case SpecialType::ENABLE_BROADCAST: if (port) { - port->broadcast(value.get_bool()); + port->enable_monitoring(value.get_bool()); } break; case SpecialType::ENABLE: |