Prepare for templates w/description
This commit is contained in:
parent
e3edbcb806
commit
62ce5465ca
@ -37,6 +37,7 @@ namespace ARDOUR {
|
|||||||
struct LIBARDOUR_API TemplateInfo {
|
struct LIBARDOUR_API TemplateInfo {
|
||||||
std::string name;
|
std::string name;
|
||||||
std::string path;
|
std::string path;
|
||||||
|
std::string description;
|
||||||
};
|
};
|
||||||
|
|
||||||
LIBARDOUR_API void find_route_templates (std::vector<TemplateInfo>& template_names);
|
LIBARDOUR_API void find_route_templates (std::vector<TemplateInfo>& template_names);
|
||||||
|
@ -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) {
|
for (vector<string>::iterator i = templates.begin(); i != templates.end(); ++i) {
|
||||||
string file = session_template_dir_to_file (*i);
|
string file = session_template_dir_to_file (*i);
|
||||||
|
|
||||||
|
TemplateInfo rti;
|
||||||
|
rti.name = Glib::path_get_basename (*i);
|
||||||
|
rti.path = *i;
|
||||||
|
|
||||||
if (read_xml) {
|
if (read_xml) {
|
||||||
XMLTree tree;
|
XMLTree tree;
|
||||||
if (!tree.read (file.c_str())) {
|
if (!tree.read (file.c_str())) {
|
||||||
continue;
|
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);
|
template_names.push_back (rti);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user