summaryrefslogtreecommitdiff
path: root/libs/ardour/export_preset.cc
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2016-08-28 10:04:57 +1000
committerTim Mayberry <mojofunk@gmail.com>2017-04-19 09:36:51 +1000
commit03559d43b9b9fa747ae312a794efc32478aa69ef (patch)
treee64ebdd5ebf564da9fc02a89328e57f1daf5be1f /libs/ardour/export_preset.cc
parent589f564ed8b63c683aea97dd624041bad03a3b4f (diff)
Use XMLNode::get/set_property API in ARDOUR::ExportPreset class
Diffstat (limited to 'libs/ardour/export_preset.cc')
-rw-r--r--libs/ardour/export_preset.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/libs/ardour/export_preset.cc b/libs/ardour/export_preset.cc
index dec4c4b79a..d18c80d872 100644
--- a/libs/ardour/export_preset.cc
+++ b/libs/ardour/export_preset.cc
@@ -29,13 +29,13 @@ ExportPreset::ExportPreset (string filename, Session & s) :
session (s), global (filename), local (0)
{
XMLNode * root;
+ std::string str;
if ((root = global.root())) {
- XMLProperty const * prop;
- if ((prop = root->property ("id"))) {
- set_id (prop->value());
+ if (root->get_property ("id", str)) {
+ set_id (str);
}
- if ((prop = root->property ("name"))) {
- set_name (prop->value());
+ if (root->get_property ("name", str)) {
+ set_name (str);
}
XMLNode * instant_xml = get_instant_xml ();
@@ -58,10 +58,10 @@ ExportPreset::set_name (string const & name)
XMLNode * node;
if ((node = global.root())) {
- node->add_property ("name", name);
+ node->set_property ("name", name);
}
if (local) {
- local->add_property ("name", name);
+ local->set_property ("name", name);
}
}
@@ -72,10 +72,10 @@ ExportPreset::set_id (string const & id)
XMLNode * node;
if ((node = global.root())) {
- node->add_property ("id", id);
+ node->set_property ("id", id);
}
if (local) {
- local->add_property ("id", id);
+ local->set_property ("id", id);
}
}
@@ -105,7 +105,7 @@ ExportPreset::save (std::string const & filename)
save_instant_xml ();
if (global.root()) {
- global.set_filename (filename);
+ global.set_filename (filename);
global.write ();
}
}