]> git.lyx.org Git - lyx.git/blobdiff - src/LyXRC.cpp
Patch from Peter.
[lyx.git] / src / LyXRC.cpp
index b1240cd0696f781124956f17a1369611dd37c4e9..6cc8af0ca136958068b8e88d390428e066083c14 100644 (file)
@@ -61,6 +61,7 @@ LexerKeyword lyxrcTags[] = {
        { "\\autocorrection_math", LyXRC::RC_AUTOCORRECTION_MATH },
        { "\\autosave", LyXRC::RC_AUTOSAVE },
        { "\\backupdir_path", LyXRC::RC_BACKUPDIR_PATH },
+       { "\\bibtex_alternatives", LyXRC::RC_BIBTEX_ALTERNATIVES },
        { "\\bibtex_command", LyXRC::RC_BIBTEX_COMMAND },
        { "\\bind_file", LyXRC::RC_BINDFILE },
        { "\\check_lastfiles", LyXRC::RC_CHECKLASTFILES },
@@ -97,6 +98,7 @@ LexerKeyword lyxrcTags[] = {
        { "\\fullscreen_width", LyXRC::RC_FULL_SCREEN_WIDTH },
        { "\\group_layouts", LyXRC::RC_GROUP_LAYOUTS },
        { "\\gui_language", LyXRC::RC_GUI_LANGUAGE },
+       { "\\index_alternatives", LyXRC::RC_INDEX_ALTERNATIVES },
        { "\\index_command", LyXRC::RC_INDEX_COMMAND },
        { "\\input", LyXRC::RC_INPUT },
        { "\\jbibtex_command", LyXRC::RC_JBIBTEX_COMMAND },
@@ -165,6 +167,7 @@ LexerKeyword lyxrcTags[] = {
        { "\\sort_layouts", LyXRC::RC_SORT_LAYOUTS },
        { "\\spell_command", LyXRC::RC_SPELL_COMMAND },
        { "\\spellcheck_continuously", LyXRC::RC_SPELLCHECK_CONTINUOUSLY },
+       { "\\splitindex_command", LyXRC::RC_SPLITINDEX_COMMAND },
        { "\\tempdir_path", LyXRC::RC_TEMPDIRPATH },
        { "\\template_path", LyXRC::RC_TEMPLATEPATH },
        { "\\tex_allows_spaces", LyXRC::RC_TEX_ALLOWS_SPACES },
@@ -591,6 +594,12 @@ int LyXRC::read(Lexer & lexrc)
                        }
                        break;
 
+               case RC_BIBTEX_ALTERNATIVES:
+                       if (lexrc.next(true)) {
+                               bibtex_alternatives.push_back(lexrc.getString());
+                       }
+                       break;
+
                case RC_BIBTEX_COMMAND:
                        if (lexrc.next(true)) {
                                bibtex_command = lexrc.getString();
@@ -603,6 +612,12 @@ int LyXRC::read(Lexer & lexrc)
                        }
                        break;
 
+               case RC_INDEX_ALTERNATIVES:
+                       if (lexrc.next(true)) {
+                               index_alternatives.push_back(lexrc.getString());
+                       }
+                       break;
+
                case RC_INDEX_COMMAND:
                        if (lexrc.next(true)) {
                                index_command = lexrc.getString();
@@ -615,6 +630,12 @@ int LyXRC::read(Lexer & lexrc)
                        }
                        break;
 
+               case RC_SPLITINDEX_COMMAND:
+                       if (lexrc.next(true)) {
+                               splitindex_command = lexrc.getString();
+                       }
+                       break;
+
                case RC_NOMENCL_COMMAND:
                        if (lexrc.next(true)) {
                                nomencl_command = lexrc.getString();
@@ -1344,6 +1365,15 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                }
                if (tag != RC_LAST)
                        break;
+       case RC_BIBTEX_ALTERNATIVES:
+               if (ignore_system_lyxrc ||
+                   bibtex_alternatives != system_lyxrc.bibtex_alternatives) {
+                       for (vector<string>::const_iterator it = bibtex_alternatives.begin();
+                            it != bibtex_alternatives.end(); ++it)
+                       os << "\\bibtex_alternatives \"" << *it << "\"\n";
+               }
+               if (tag != RC_LAST)
+                       break;
        case RC_BIBTEX_COMMAND:
                if (ignore_system_lyxrc ||
                    bibtex_command != system_lyxrc.bibtex_command) {
@@ -1358,6 +1388,15 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                }
                if (tag != RC_LAST)
                        break;
+       case RC_INDEX_ALTERNATIVES:
+               if (ignore_system_lyxrc ||
+                   index_alternatives != system_lyxrc.index_alternatives) {
+                       for (vector<string>::const_iterator it = index_alternatives.begin();
+                            it != index_alternatives.end(); ++it)
+                       os << "\\index_alternatives \"" << *it << "\"\n";
+               }
+               if (tag != RC_LAST)
+                       break;
        case RC_INDEX_COMMAND:
                if (ignore_system_lyxrc ||
                    index_command != system_lyxrc.index_command) {
@@ -1372,6 +1411,13 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                }
                if (tag != RC_LAST)
                        break;
+       case RC_SPLITINDEX_COMMAND:
+               if (ignore_system_lyxrc ||
+                   splitindex_command != system_lyxrc.splitindex_command) {
+                       os << "\\splitindex_command \"" << escapeCommand(splitindex_command) << "\"\n";
+               }
+               if (tag != RC_LAST)
+                       break;
        case RC_NOMENCL_COMMAND:
                if (ignore_system_lyxrc ||
                    nomencl_command != system_lyxrc.nomencl_command) {