mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 02:56:35 +01:00
Merged with trunk R1393.
git-svn-id: svn://localhost/ardour2/branches/midi@1395 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
cd37c36326
commit
f9f5ec85fb
85 changed files with 5136 additions and 2848 deletions
|
|
@ -324,10 +324,25 @@ ControlProtocolManager::get_state (void)
|
|||
Glib::Mutex::Lock lm (protocols_lock);
|
||||
|
||||
for (list<ControlProtocolInfo*>::iterator i = control_protocol_info.begin(); i != control_protocol_info.end(); ++i) {
|
||||
XMLNode* child = new XMLNode (X_("Protocol"));
|
||||
child->add_property (X_("name"), (*i)->name);
|
||||
child->add_property (X_("active"), (*i)->protocol ? "yes" : "no");
|
||||
root->add_child_nocopy (*child);
|
||||
|
||||
XMLNode * child;
|
||||
|
||||
if ((*i)->protocol) {
|
||||
child = &((*i)->protocol->get_state());
|
||||
child->add_property (X_("active"), "yes");
|
||||
// should we update (*i)->state here? probably.
|
||||
root->add_child_nocopy (*child);
|
||||
}
|
||||
else if ((*i)->state) {
|
||||
// keep ownership clear
|
||||
root->add_child_copy (*(*i)->state);
|
||||
}
|
||||
else {
|
||||
child = new XMLNode (X_("Protocol"));
|
||||
child->add_property (X_("name"), (*i)->name);
|
||||
child->add_property (X_("active"), "no");
|
||||
root->add_child_nocopy (*child);
|
||||
}
|
||||
}
|
||||
|
||||
return *root;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue