]> git.lyx.org Git - lyx.git/blobdiff - src/LyXRC.cpp
revert erroneous previous commit.
[lyx.git] / src / LyXRC.cpp
index 50837448a9b8a8deb4adf697ce8ef5f4ceed5793..dc78e8d3d5039fd3732c7cf53792d4aa567a8307 100644 (file)
@@ -85,7 +85,6 @@ LexerKeyword lyxrcTags[] = {
        { "\\dialogs_iconify_with_main", LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN },
        { "\\display_graphics", LyXRC::RC_DISPLAY_GRAPHICS },
        { "\\document_path", LyXRC::RC_DOCUMENTPATH },
-       { "\\env_gui_language", LyXRC::RC_ENV_GUI_LANGUAGE },
        { "\\escape_chars", LyXRC::RC_ESC_CHARS },
        { "\\example_path", LyXRC::RC_EXAMPLEPATH },
        { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
@@ -112,10 +111,12 @@ LexerKeyword lyxrcTags[] = {
        { "\\language_package", LyXRC::RC_LANGUAGE_PACKAGE },
        { "\\language_use_babel", LyXRC::RC_LANGUAGE_USE_BABEL },
        { "\\load_session", LyXRC::RC_LOADSESSION },
+       { "\\mac_like_word_movement", LyXRC::RC_MAC_LIKE_WORD_MOVEMENT },
        { "\\macro_edit_style", LyXRC::RC_MACRO_EDIT_STYLE },
        { "\\make_backup", LyXRC::RC_MAKE_BACKUP },
        { "\\mark_foreign_language", LyXRC::RC_MARK_FOREIGN_LANGUAGE },
        { "\\mouse_wheel_speed", LyXRC::RC_MOUSE_WHEEL_SPEED },
+       { "\\nomencl_command", LyXRC::RC_NOMENCL_COMMAND },
        { "\\num_lastfiles", LyXRC::RC_NUMLASTFILES },
        { "\\open_buffers_in_tabs", LyXRC::RC_OPEN_BUFFERS_IN_TABS },
        { "\\path_prefix", LyXRC::RC_PATH_PREFIX },
@@ -226,6 +227,7 @@ void LyXRC::setDefaults()
        bibtex_command = "bibtex";
        fontenc = "default";
        index_command = "makeindex -c -q";
+       nomencl_command = "makeindex -s nomencl.ist";
        dpi = 75;
        // Because a screen typically is wider than a piece of paper:
        zoom = 150;
@@ -280,13 +282,13 @@ void LyXRC::setDefaults()
        sort_layouts = false;
        group_layouts = true;
        default_language = "english";
-       env_gui_language = true;
-       gui_language = string();
+       gui_language = "auto";
        show_banner = true;
        windows_style_tex_paths = false;
        tex_allows_spaces = false;
        date_insert_format = "%x";
        cursor_follows_scrollbar = false;
+       mac_like_word_movement = false;
        macro_edit_style = MACRO_EDIT_INLINE_BOX;
        dialogs_iconify_with_main = false;
        label_init_length = 3;
@@ -604,6 +606,12 @@ int LyXRC::read(Lexer & lexrc)
                        }
                        break;
 
+               case RC_NOMENCL_COMMAND:
+                       if (lexrc.next(true)) {
+                               nomencl_command = lexrc.getString();
+                       }
+                       break;
+
                case RC_SCREEN_DPI:
                        lexrc >> dpi;
                        break;
@@ -802,6 +810,10 @@ int LyXRC::read(Lexer & lexrc)
                        lexrc >> cursor_follows_scrollbar;
                        break;
 
+               case RC_MAC_LIKE_WORD_MOVEMENT:
+                       lexrc >> mac_like_word_movement;
+                       break;
+
                case RC_MACRO_EDIT_STYLE:
                        if (lexrc.next()) {
                                switch (lexrc.getInteger()) {
@@ -996,10 +1008,6 @@ int LyXRC::read(Lexer & lexrc)
                        lexrc >> default_language;
                        break;
 
-               case RC_ENV_GUI_LANGUAGE:
-                       lexrc >> env_gui_language;
-                       break;
-
                case RC_GUI_LANGUAGE:
                        lexrc >> gui_language;
                        break;
@@ -1321,6 +1329,13 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                }
                if (tag != RC_LAST)
                        break;
+       case RC_NOMENCL_COMMAND:
+               if (ignore_system_lyxrc ||
+                   nomencl_command != system_lyxrc.nomencl_command) {
+                       os << "\\nomencl_command \"" << escapeCommand(nomencl_command) << "\"\n";
+               }
+               if (tag != RC_LAST)
+                       break;
        case RC_TEX_EXPECTS_WINDOWS_PATHS:
                if (ignore_system_lyxrc ||
                    windows_style_tex_paths != system_lyxrc.windows_style_tex_paths) {
@@ -1494,6 +1509,15 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                }
                if (tag != RC_LAST)
                        break;
+       case RC_MAC_LIKE_WORD_MOVEMENT:
+               if (ignore_system_lyxrc ||
+                   mac_like_word_movement
+                   != system_lyxrc.mac_like_word_movement) {
+                       os << "\\mac_like_word_movement "
+                          << convert<string>(mac_like_word_movement) << '\n';
+               }
+               if (tag != RC_LAST)
+                       break;
        case RC_MACRO_EDIT_STYLE:
                if (ignore_system_lyxrc ||
                    macro_edit_style
@@ -2275,13 +2299,6 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                }
                if (tag != RC_LAST)
                        break;
-       case RC_ENV_GUI_LANGUAGE:
-               if (ignore_system_lyxrc ||
-                   env_gui_language != system_lyxrc.env_gui_language) {
-                       os << "\\env_gui_language " << env_gui_language << '\n';
-               }
-               if (tag != RC_LAST)
-                       break;
        case RC_GUI_LANGUAGE:
                if (ignore_system_lyxrc ||
                    gui_language != system_lyxrc.gui_language) {
@@ -2470,6 +2487,10 @@ string const LyXRC::getDescription(LyXRCTags tag)
                str = _("LyX normally doesn't update the cursor position if you move the scrollbar. Set to true if you'd prefer to always have the cursor on screen.");
                break;
 
+       case RC_MAC_LIKE_WORD_MOVEMENT:
+               str = _("Use the Mac OS X conventions for the word-level cursor movement");
+               break;
+
        case RC_SHOW_MACRO_LABEL:
                str = _("Show a small box around a Math Macro with the macro name when the cursor is inside.");
                break;
@@ -2529,6 +2550,10 @@ string const LyXRC::getDescription(LyXRCTags tag)
                str = _("Define the options of makeindex (cf. man makeindex) or select an alternative compiler. E.g., using xindy/make-rules, the command string would be \"makeindex.sh -m $$lang\".");
                break;
 
+       case RC_NOMENCL_COMMAND:
+               str = _("Define the options of makeindex (cf. man makeindex) to be used for nomenclatures. This might differ from the index processing options.");
+               break;
+
        case RC_INPUT:
                break;