]> git.lyx.org Git - lyx.git/blobdiff - src/LyXRC.cpp
de.po: fix doubled accelerator keys
[lyx.git] / src / LyXRC.cpp
index cc60cdeb116bb028b13c64a8657f90d4d502396f..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 },
@@ -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;
@@ -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;
@@ -1482,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
@@ -2263,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"
@@ -2444,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;