-Configuration::save_config_options_predicate (ConfigVariableBase::Owner owner)
-{
- /* only save things that were in the config file to start with */
- return owner & ConfigVariableBase::Config;
-}
-
-XMLNode&
-Configuration::get_state ()
-{
- XMLNode* root;
- LocaleGuard lg (X_("POSIX"));
-
- root = new XMLNode("Ardour");
- typedef map<string, MidiPortDescriptor*>::const_iterator CI;
- for(CI m = midi_ports.begin(); m != midi_ports.end(); ++m){
- root->add_child_nocopy(m->second->get_state());
- }
-
- root->add_child_nocopy (get_variables (sigc::mem_fun (*this, &Configuration::save_config_options_predicate), "Config"));
- root->add_child_nocopy (get_variables (sigc::mem_fun (*this, &Configuration::save_config_options_predicate), "Canvas"));
-
- if (_extra_xml) {
- root->add_child_copy (*_extra_xml);
- }
-
- root->add_child_nocopy (ControlProtocolManager::instance().get_state());
-
- return *root;
-}
-
-XMLNode&
-Configuration::get_variables (sigc::slot<bool,ConfigVariableBase::Owner> predicate, std::string which_node)
-{
- XMLNode* node;
- LocaleGuard lg (X_("POSIX"));
-
- node = new XMLNode(which_node);
-
-#undef CONFIG_VARIABLE
-#undef CONFIG_VARIABLE_SPECIAL
-#define CONFIG_VARIABLE(type,var,Name,value) \
- if (node->name() == "Config") { if (predicate (var.owner())) { var.add_to_node (*node); }}
-#define CONFIG_VARIABLE_SPECIAL(type,var,Name,value,mutator) \
- if (node->name() == "Config") { if (predicate (var.owner())) { var.add_to_node (*node); }}
-#include "ardour/configuration_vars.h"
-#undef CONFIG_VARIABLE
-#undef CONFIG_VARIABLE_SPECIAL
-
-#undef CANVAS_VARIABLE
-#define CANVAS_VARIABLE(var,Name) if (node->name() == "Canvas") { if (predicate (ConfigVariableBase::Config)) { var.add_to_node (*node); }}
-#include "ardour/canvas_vars.h"
-#undef CANVAS_VARIABLE
-
- return *node;
-}
-
-int
-Configuration::set_state (const XMLNode& root)