diff options
author | Robin Gareus <robin@gareus.org> | 2013-05-21 21:23:10 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2013-05-21 21:23:10 +0200 |
commit | 4341d675dcedb976bb7cfb25fba7ff7d69f2f161 (patch) | |
tree | 3c4c6e8057cc04b8f06cddfbf614a82ce6203f50 /gtk2_ardour/processor_box.cc | |
parent | 04967de3afa09bbfc127d3eb052bc8f3dabd8553 (diff) |
remember plugin-UI type (custom/basic) with session.
amend to 3.1-81-g1acf8bd
Diffstat (limited to 'gtk2_ardour/processor_box.cc')
-rw-r--r-- | gtk2_ardour/processor_box.cc | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 9ac57a356c..2f8513fd2a 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -2642,6 +2642,38 @@ ProcessorWindowProxy::session_handle() return 0; } +XMLNode& +ProcessorWindowProxy::get_state () const +{ + XMLNode *node; + node = &ProxyBase::get_state(); + node->add_property (X_("custom-ui"), is_custom? X_("yes") : X_("no")); + return *node; +} + +void +ProcessorWindowProxy::set_state (const XMLNode& node) +{ + XMLNodeList children = node.children (); + XMLNodeList::const_iterator i = children.begin (); + while (i != children.end()) { + XMLProperty* prop = (*i)->property (X_("name")); + if ((*i)->name() == X_("Window") && prop && prop->value() == _name) { + break; + } + ++i; + } + + if (i != children.end()) { + XMLProperty* prop; + if ((prop = (*i)->property (X_("custom-ui"))) != 0) { + want_custom = PBD::string_is_affirmative (prop->value ()); + } + } + + ProxyBase::set_state(node); +} + Gtk::Window* ProcessorWindowProxy::get (bool create) { |