]> git.lyx.org Git - lyx.git/blobdiff - src/LyXRC.cpp
Workaround for #6865: smarter FontList::setMisspelled implementation
[lyx.git] / src / LyXRC.cpp
index 623df41a6330ab8521122cde40d0980e651a96d1..252bbfb36d4c3c28c8a1a3feaa9f3355dfa2d296 100644 (file)
@@ -199,6 +199,7 @@ LexerKeyword lyxrcTags[] = {
        { "\\use_pixmap_cache", LyXRC::RC_USE_PIXMAP_CACHE },
        // compatibility with versions older than 1.4.0 only
        { "\\use_pspell", LyXRC::RC_USE_SPELL_LIB },
+       { "\\use_system_colors", LyXRC::RC_USE_SYSTEM_COLORS },
        // compatibility with versions older than 1.4.0 only
        { "\\use_tempdir", LyXRC::RC_USETEMPDIR },
        { "\\use_tooltip", LyXRC::RC_USE_TOOLTIP },
@@ -330,6 +331,7 @@ void LyXRC::setDefaults()
        preview_hashed_labels  = false;
        preview_scale_factor = 1.0;
        use_converter_cache = true;
+       use_system_colors = false;
        use_tooltip = true;
        use_pixmap_cache = false;
        converter_cache_maxage = 6 * 30 * 24 * 3600; // 6 months
@@ -914,6 +916,9 @@ int LyXRC::read(Lexer & lexrc)
                case RC_ACCEPT_COMPOUND:
                        lexrc >> spellchecker_accept_compound;
                        break;
+               case RC_USE_SYSTEM_COLORS:
+                       lexrc >> use_system_colors;
+                       break;
                case RC_USE_TOOLTIP:
                        lexrc >> use_tooltip;
                        break;
@@ -2382,6 +2387,15 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                // obsoleted in 2.0
                if (tag != RC_LAST)
                        break;
+       case RC_USE_SYSTEM_COLORS:
+               if (ignore_system_lyxrc ||
+                   use_system_colors != system_lyxrc.use_system_colors) {
+                       os << "\\use_system_colors "
+                          << convert<string>(use_system_colors)
+                          << '\n';
+               }
+               if (tag != RC_LAST)
+                       break;
        case RC_USE_TOOLTIP:
                if (ignore_system_lyxrc ||
                    use_tooltip != system_lyxrc.use_tooltip) {
@@ -2932,6 +2946,7 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new)
        case LyXRC::RC_USE_ESC_CHARS:
        case LyXRC::RC_USE_INP_ENC:
        case LyXRC::RC_USE_PERS_DICT:
+       case LyXRC::RC_USE_SYSTEM_COLORS:
        case LyXRC::RC_USE_TOOLTIP:
        case LyXRC::RC_USE_PIXMAP_CACHE:
        case LyXRC::RC_USE_SPELL_LIB:
@@ -3382,6 +3397,10 @@ string const LyXRC::getDescription(LyXRCTags tag)
        case RC_USETEMPDIR:
                break;
 
+       case RC_USE_USE_SYSTEM_COLORS:
+               str = _("Enable use the system colors for some things like main window background and selection.");
+               break;
+
        case RC_USE_TOOLTIP:
                str = _("Enable the automatic appearance of tool tips in the work area.");
                break;