summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Mueller <github@johannes-mueller.org>2017-08-19 00:04:07 +0200
committerRobin Gareus <robin@gareus.org>2017-08-20 21:09:30 +0200
commit908369ab3e31f82eae3734cfe61421912d2fba6a (patch)
tree55ae3e5e605d5ff151ebd7b5c0ab15d744ab0251
parente933db1a12643426e2513162b4fc03854ff4f741 (diff)
Save template description at toplevel rather than in <Metadata/>
-rw-r--r--gtk2_ardour/template_dialog.cc9
-rw-r--r--libs/ardour/template_utils.cc15
2 files changed, 8 insertions, 16 deletions
diff --git a/gtk2_ardour/template_dialog.cc b/gtk2_ardour/template_dialog.cc
index e5b430a7bb..cce8d2eb3f 100644
--- a/gtk2_ardour/template_dialog.cc
+++ b/gtk2_ardour/template_dialog.cc
@@ -256,15 +256,10 @@ TemplateManager::save_template_desc ()
return;
}
- XMLNode* md = tree.root()->child (X_("Metadata"));
- if (!md) {
- md = new XMLNode (X_("Metadata"));
- tree.root()->add_child_nocopy (*md);
- }
- XMLNode* desc = md->child (X_("description"));
+ XMLNode* desc = tree.root()->child (X_("description"));
if (!desc) {
desc = new XMLNode (X_("description"));
- md->add_child_nocopy (*desc);
+ tree.root()->add_child_nocopy (*desc);
}
XMLNode* dn = new XMLNode (X_("content"), desc_txt);
desc->add_child_nocopy (*dn);
diff --git a/libs/ardour/template_utils.cc b/libs/ardour/template_utils.cc
index 75c8d5b9af..13674cd51d 100644
--- a/libs/ardour/template_utils.cc
+++ b/libs/ardour/template_utils.cc
@@ -111,19 +111,16 @@ find_session_templates (vector<TemplateInfo>& template_names, bool read_xml)
if (pv != 0) {
pv->get_property (X_("created-with"), created_with);
}
-
+
string description = "No Description";
- XMLNode *md = tree.root()->child("Metadata");
- if (md != 0) {
- XMLNode *desc = md->child("description");
- if (desc != 0) {
- description = desc->attribute_value();
- }
+ XMLNode *desc = tree.root()->child("description");
+ if (desc != 0) {
+ description = desc->attribute_value();
}
-
+
rti.created_with = created_with;
rti.description = description;
-
+
}
template_names.push_back (rti);