]> git.lyx.org Git - lyx.git/blobdiff - src/LyXRC.cpp
whitespace
[lyx.git] / src / LyXRC.cpp
index 3e19dcc68359a6e4d0f84716d47e1f2c1c1b91cc..5b351fc5a5069ac2e7d4205c8dfb379c8ba3f79b 100644 (file)
@@ -126,6 +126,7 @@ LexerKeyword lyxrcTags[] = {
        { "\\language_package", LyXRC::RC_LANGUAGE_PACKAGE },
        { "\\language_use_babel", LyXRC::RC_LANGUAGE_USE_BABEL },
        { "\\load_session", LyXRC::RC_LOADSESSION },
+       { "\\mac_dontswap_ctrl_meta", LyXRC::RC_MAC_DONTSWAP_CTRL_META },
        { "\\mac_like_word_movement", LyXRC::RC_MAC_LIKE_WORD_MOVEMENT },
        { "\\macro_edit_style", LyXRC::RC_MACRO_EDIT_STYLE },
        { "\\make_backup", LyXRC::RC_MAKE_BACKUP },
@@ -324,6 +325,7 @@ void LyXRC::setDefaults()
        scroll_below_document = false;
        scroll_wheel_zoom = SCROLL_WHEEL_ZOOM_CTRL;
        paragraph_markers = false;
+       mac_dontswap_ctrl_meta = false;
        mac_like_word_movement = false;
        macro_edit_style = MACRO_EDIT_INLINE_BOX;
        dialogs_iconify_with_main = false;
@@ -331,7 +333,7 @@ void LyXRC::setDefaults()
        preview_hashed_labels  = false;
        preview_scale_factor = 1.0;
        use_converter_cache = true;
-       use_system_colors = true;
+       use_system_colors = false;
        use_tooltip = true;
        use_pixmap_cache = false;
        converter_cache_maxage = 6 * 30 * 24 * 3600; // 6 months
@@ -891,6 +893,10 @@ int LyXRC::read(Lexer & lexrc)
                        lexrc >> paragraph_markers;
                        break;
 
+               case RC_MAC_DONTSWAP_CTRL_META:
+                       lexrc >> mac_dontswap_ctrl_meta;
+                       break;
+
                case RC_MAC_LIKE_WORD_MOVEMENT:
                        lexrc >> mac_like_word_movement;
                        break;
@@ -1736,6 +1742,15 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                }
                if (tag != RC_LAST)
                        break;
+       case RC_MAC_DONTSWAP_CTRL_META:
+               if (ignore_system_lyxrc ||
+                   mac_dontswap_ctrl_meta
+                   != system_lyxrc.mac_dontswap_ctrl_meta) {
+                       os << "\\mac_dontswap_ctrl_meta "
+                          << convert<string>(mac_dontswap_ctrl_meta) << '\n';
+               }
+               if (tag != RC_LAST)
+                       break;
        case RC_MAC_LIKE_WORD_MOVEMENT:
                if (ignore_system_lyxrc ||
                    mac_like_word_movement
@@ -2874,6 +2889,7 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new)
        case LyXRC::RC_LANGUAGE_GLOBAL_OPTIONS:
        case LyXRC::RC_LANGUAGE_PACKAGE:
        case LyXRC::RC_LANGUAGE_USE_BABEL:
+       case LyXRC::RC_MAC_DONTSWAP_CTRL_META:
        case LyXRC::RC_MAC_LIKE_WORD_MOVEMENT:
        case LyXRC::RC_MACRO_EDIT_STYLE:
        case LyXRC::RC_MAKE_BACKUP:
@@ -3049,6 +3065,10 @@ string const LyXRC::getDescription(LyXRCTags tag)
                str = _("LyX normally doesn't allow the user to scroll further than the bottom of the document. Set to true if you prefer to scroll the bottom of the document to the top of the screen");
                break;
 
+       case RC_MAC_DONTSWAP_CTRL_META:
+               str = _("Make Apple key act as Meta and Control key as Ctrl.");
+               break;
+
        case RC_MAC_LIKE_WORD_MOVEMENT:
                str = _("Use the Mac OS X conventions for the word-level cursor movement");
                break;
@@ -3397,7 +3417,7 @@ string const LyXRC::getDescription(LyXRCTags tag)
        case RC_USETEMPDIR:
                break;
 
-       case RC_USE_TOOLTIP:
+       case RC_USE_USE_SYSTEM_COLORS:
                str = _("Enable use the system colors for some things like main window background and selection.");
                break;