Prepare for templates w/description
authorRobin Gareus <robin@gareus.org>
Fri, 11 Aug 2017 12:58:41 +0000 (14:58 +0200)
committerRobin Gareus <robin@gareus.org>
Fri, 11 Aug 2017 13:24:05 +0000 (15:24 +0200)
libs/ardour/ardour/template_utils.h
libs/ardour/template_utils.cc

index 9887ab9cdc9d6148c05809ba32e7cbb25822cb60..d89d0bcdafff31f42d99330d180663b0f0584b6d 100644 (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);
index 81a7f31078c5a377d0ea2a6188cff9b4d5a53fc9..d355231115f13beebceeb44292f8435018bda47f 100644 (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);
        }
 }