]> git.lyx.org Git - lyx.git/blobdiff - src/LyXRC.cpp
de.po: fix doubled accelerator keys
[lyx.git] / src / LyXRC.cpp
index fa916ba24288c70052be154b52a91f6a0d8f34d8..3f9366cb044a73234ca9c23ec226cdd0a97526e4 100644 (file)
@@ -95,6 +95,7 @@ LexerKeyword lyxrcTags[] = {
        { "\\fullscreen_toolbars", LyXRC::RC_FULL_SCREEN_TOOLBARS },
        { "\\fullscreen_width", LyXRC::RC_FULL_SCREEN_WIDTH },
        { "\\group_layouts", LyXRC::RC_GROUP_LAYOUTS },
+       { "\\gui_language", LyXRC::RC_GUI_LANGUAGE },
        { "\\index_command", LyXRC::RC_INDEX_COMMAND },
        { "\\input", LyXRC::RC_INPUT },
        { "\\kbmap", LyXRC::RC_KBMAP },
@@ -110,6 +111,7 @@ 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 },
@@ -254,7 +256,7 @@ void LyXRC::setDefaults()
        load_session = false;
        make_backup = true;
        backupdir_path.erase();
-       display_graphics = graphics::ColorDisplay;
+       display_graphics = true;
        // Spellchecker settings:
        use_spell_lib = true;
        isp_command = "ispell";
@@ -278,11 +280,13 @@ void LyXRC::setDefaults()
        sort_layouts = false;
        group_layouts = true;
        default_language = "english";
+       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;
@@ -420,7 +424,7 @@ int LyXRC::read(Lexer & lexrc)
 
                case RC_DISPLAY_GRAPHICS:
                        if (lexrc.next())
-                               display_graphics = graphics::displayTranslator().find(lexrc.getString());
+                               display_graphics = lexrc.getString() == "true";
                        break;
 
                case RC_TEX_EXPECTS_WINDOWS_PATHS:
@@ -798,6 +802,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()) {
@@ -992,6 +1000,10 @@ int LyXRC::read(Lexer & lexrc)
                        lexrc >> default_language;
                        break;
 
+               case RC_GUI_LANGUAGE:
+                       lexrc >> gui_language;
+                       break;
+
                case RC_LABEL_INIT_LENGTH:
                        lexrc >> label_init_length;
                        break;
@@ -1224,10 +1236,9 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                if (ignore_system_lyxrc ||
                    display_graphics != system_lyxrc.display_graphics) {
                        os << "# Display graphics within LyX\n"
-                          << "# monochrome|grayscale|color|none\n"
+                          << "# true|false\n"
                           << "\\display_graphics "
-                          << graphics::displayTranslator().find(
-                                graphics::DisplayType(display_graphics))
+                          << (display_graphics ? "true" : "false")
                           << '\n';
                }
                if (tag != RC_LAST)
@@ -1483,6 +1494,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
@@ -2264,6 +2284,13 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                }
                if (tag != RC_LAST)
                        break;
+       case RC_GUI_LANGUAGE:
+               if (ignore_system_lyxrc ||
+                   gui_language != system_lyxrc.gui_language) {
+                       os << "\\gui_language " << gui_language << '\n';
+               }
+               if (tag != RC_LAST)
+                       break;
 
                os << "\n#\n"
                   << "# FORMATS SECTION ##########################\n"
@@ -2445,6 +2472,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;