13
0

Prepare for templates w/description

This commit is contained in:
Robin Gareus 2017-08-11 14:58:41 +02:00
parent e3edbcb806
commit 62ce5465ca
2 changed files with 7 additions and 5 deletions

View File

@ -37,6 +37,7 @@ namespace ARDOUR {
struct LIBARDOUR_API TemplateInfo {
std::string name;
std::string path;
std::string description;
};
LIBARDOUR_API void find_route_templates (std::vector<TemplateInfo>& template_names);

View File

@ -94,18 +94,19 @@ find_session_templates (vector<TemplateInfo>& template_names, bool read_xml)
for (vector<string>::iterator i = templates.begin(); i != templates.end(); ++i) {
string file = session_template_dir_to_file (*i);
TemplateInfo rti;
rti.name = Glib::path_get_basename (*i);
rti.path = *i;
if (read_xml) {
XMLTree tree;
if (!tree.read (file.c_str())) {
continue;
}
// TODO extract description,
// compare to Session::get_info_from_path
}
TemplateInfo rti;
rti.name = Glib::path_get_basename (*i);
rti.path = *i;
template_names.push_back (rti);
}
}