]> git.lyx.org Git - lyx.git/blobdiff - src/insets/ExternalTemplate.C
The speed patch: redraw only rows that have changed
[lyx.git] / src / insets / ExternalTemplate.C
index 482a0663dbf7e567bd6c341c3649d9bae607e2a1..5653623d4dbe2c2775239d9e2aa75d5ffe847452 100644 (file)
@@ -18,8 +18,8 @@
 
 #include "support/filetools.h"
 #include "support/lstrings.h"
+#include "support/package.h"
 #include "support/path.h"
-#include "support/path_defines.h"
 
 namespace support = lyx::support;
 
@@ -54,7 +54,7 @@ Template::Format::Format()
 
 TemplateManager::TemplateManager()
 {
-       readTemplates(support::user_lyxdir());
+       readTemplates(support::package().user_support());
        if (lyxerr.debugging(Debug::EXTERNAL)) {
                dumpPreambleDefs(lyxerr);
                lyxerr << '\n';
@@ -126,8 +126,14 @@ public:
                ost << "\tFormat " << vt.first << '\n'
                    << "\t\tProduct " << ft.product << '\n'
                    << "\t\tUpdateFormat " << ft.updateFormat << '\n'
-                   << "\t\tUpdateResult " << ft.updateResult << '\n'
-                   << "\t\tRequirement " << ft.requirement << '\n';
+                   << "\t\tUpdateResult " << ft.updateResult << '\n';
+
+               vector<string>::const_iterator qit = ft.requirements.begin();
+               vector<string>::const_iterator qend = ft.requirements.end();
+               for (; qit != qend; ++qit) {
+                       lyxerr << "req:" << *qit << std::endl;
+                       ost << "\t\tRequirement " << *qit << '\n';
+               }
 
                typedef vector<Template::Option> Options;
                Options::const_iterator oit  = ft.options.begin();
@@ -502,7 +508,7 @@ void Template::Format::readFormat(LyXLex & lex)
 
                case FO_REQUIREMENT:
                        lex.next(true);
-                       requirement = lex.getString();
+                       requirements.push_back(lex.getString());
                        break;
 
                case FO_PREAMBLE: