]> git.lyx.org Git - lyx.git/blobdiff - src/LyXRC.cpp
* src/frontends/GuiDocument.{cpp,h}:
[lyx.git] / src / LyXRC.cpp
index 0cf9f6dd1867934e6fce273c13ccd95b1a9f2cfb..a4520de545474812293b38f58edfb0fc3b621b73 100644 (file)
@@ -156,6 +156,7 @@ keyword_item lyxrcTags[] = {
        { "\\use_spell_lib", LyXRC::RC_USE_SPELL_LIB },
        // compatibility with versions older than 1.4.0 only
        { "\\use_tempdir", LyXRC::RC_USETEMPDIR },
+       { "\\use_tooltip", LyXRC::RC_USE_TOOLTIP },
        { "\\user_email", LyXRC::RC_USER_EMAIL },
        { "\\user_name", LyXRC::RC_USER_NAME },
        { "\\view_dvi_paper_option", LyXRC::RC_VIEWDVI_PAPEROPTION },
@@ -265,6 +266,7 @@ void LyXRC::setDefaults() {
        preview_hashed_labels  = false;
        preview_scale_factor = "0.9";
        use_converter_cache = true;
+       use_tooltip = true;
        use_pixmap_cache = false;
        converter_cache_maxage = 6 * 30 * 24 * 3600; // 6 months
 
@@ -882,6 +884,11 @@ int LyXRC::read(Lexer & lexrc)
                                isp_use_pers_dict = lexrc.getBool();
                        }
                        break;
+               case RC_USE_TOOLTIP:
+                       if (lexrc.next()) {
+                               use_tooltip = lexrc.getBool();
+                       }
+                       break;
                case RC_USE_PIXMAP_CACHE:
                        if (lexrc.next()) {
                                use_pixmap_cache = lexrc.getBool();
@@ -2054,6 +2061,13 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                }
                if (tag != RC_LAST)
                        break;
+       case RC_USE_TOOLTIP:
+               if (ignore_system_lyxrc ||
+                   use_tooltip != system_lyxrc.use_tooltip) {
+                       os << "\\use_tooltip "
+                          << convert<string>(use_tooltip)
+                          << '\n';
+               }
        case RC_USE_PIXMAP_CACHE:
                if (ignore_system_lyxrc ||
                    use_pixmap_cache != system_lyxrc.use_pixmap_cache) {
@@ -2669,6 +2683,10 @@ string const LyXRC::getDescription(LyXRCTags tag)
                str = _("Specify whether to pass the -T input encoding option to ispell. Enable this if you cannot check the spelling of words containing accented letters. This may not work with all dictionaries.");
                break;
 
+       case RC_USE_TOOLTIP:
+               str = _("Enable the automatic appearance of tool tips in the work area.");
+               break;
+
        case RC_USE_PIXMAP_CACHE:
                str = _("Enable the pixmap cache that might improve performance on Mac and Windows.");
                break;