]> git.lyx.org Git - lyx.git/blobdiff - src/LyXRC.cpp
* LaTeXFeatures.cpp (getI18nPreamble):
[lyx.git] / src / LyXRC.cpp
index 94edf1715498d14c06faee57710a3ba5de2085b1..b196c1c838fb2cb2223c55eaba7cf50dfa7d460a 100644 (file)
@@ -85,6 +85,7 @@ LexerKeyword lyxrcTags[] = {
        { "\\converter_cache_maxage", LyXRC::RC_CONVERTER_CACHE_MAXAGE },
        { "\\copier", LyXRC::RC_COPIER },
        { "\\cursor_follows_scrollbar", LyXRC::RC_CURSOR_FOLLOWS_SCROLLBAR },
+       { "\\cursor_width", LyXRC::RC_CURSOR_WIDTH },
        { "\\date_insert_format", LyXRC::RC_DATE_INSERT_FORMAT },
        { "\\def_file", LyXRC::RC_DEFFILE },
        { "\\default_decimal_point", LyXRC::RC_DEFAULT_DECIMAL_POINT },
@@ -99,6 +100,7 @@ LexerKeyword lyxrcTags[] = {
        { "\\example_path", LyXRC::RC_EXAMPLEPATH },
        { "\\export_overwrite", LyXRC::RC_EXPORT_OVERWRITE },
        { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
+       { "\\force_paint_single_char", LyXRC::RC_FORCE_PAINT_SINGLE_CHAR },
        { "\\format", LyXRC::RC_FILEFORMAT },
        { "\\forward_search_dvi", LyXRC::RC_FORWARD_SEARCH_DVI },
        { "\\forward_search_pdf", LyXRC::RC_FORWARD_SEARCH_PDF },
@@ -359,6 +361,7 @@ void LyXRC::setDefaults()
        completion_inline_dots = -1;
        completion_inline_delay = 0.2;
        default_decimal_point = ".";
+       cursor_width = 1;
 }
 
 
@@ -422,6 +425,9 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format)
        if (!lexrc.isOK())
                return ReadError;
 
+       // default for current rowpainter capabilities
+       force_paint_single_char = true;
+
        // format prior to 2.0 and introduction of format tag
        unsigned int format = 0;
 
@@ -523,6 +529,10 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format)
                        lexrc >> fontenc;
                        break;
 
+               case RC_FORCE_PAINT_SINGLE_CHAR:
+                       lexrc >> force_paint_single_char;
+                       break;
+                               
                case RC_PRINTER:
                        lexrc >> printer;
                        break;
@@ -895,6 +905,10 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format)
                        lexrc >> cursor_follows_scrollbar;
                        break;
 
+               case RC_CURSOR_WIDTH:
+                       lexrc >> cursor_width;
+                       break;
+
                case RC_SCROLL_BELOW_DOCUMENT:
                        lexrc >> scroll_below_document;
                        break;
@@ -1090,6 +1104,8 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format)
                                        flgs |= Format::document;
                                else if (flag == "vector")
                                        flgs |= Format::vector;
+                               else if (flag == "menu=export")
+                                       flgs |= Format::export_menu;
                                else
                                        LYXERR0("Ignoring unknown flag `"
                                               << flag << "' for format `"
@@ -1744,6 +1760,15 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                }
                if (tag != RC_LAST)
                        break;
+       case RC_CURSOR_WIDTH:
+               if (ignore_system_lyxrc ||
+                       cursor_width
+                       != system_lyxrc.cursor_width) {
+                       os << "\\cursor_width "
+                       << cursor_width << '\n';
+               }
+               if (tag != RC_LAST)
+                       break;
        case RC_SCROLL_BELOW_DOCUMENT:
                if (ignore_system_lyxrc ||
                    scroll_below_document
@@ -2178,6 +2203,14 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                if (tag != RC_LAST)
                        break;
 
+       case RC_FORCE_PAINT_SINGLE_CHAR:
+               if (ignore_system_lyxrc ||
+                   force_paint_single_char != system_lyxrc.force_paint_single_char) {
+                       os << "\\force_paint_single_char \"" << force_paint_single_char << "\"\n";
+               }
+               if (tag != RC_LAST)
+                       break;
+
                os << "\n#\n"
                   << "# FILE SECTION ######################################\n"
                   << "#\n\n";
@@ -2878,6 +2911,7 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new)
        case LyXRC::RC_ESC_CHARS:
        case LyXRC::RC_EXAMPLEPATH:
        case LyXRC::RC_FONT_ENCODING:
+       case LyXRC::RC_FORCE_PAINT_SINGLE_CHAR:
        case LyXRC::RC_FILEFORMAT:
        case LyXRC::RC_GROUP_LAYOUTS:
        case LyXRC::RC_HUNSPELLDIR_PATH:
@@ -2986,6 +3020,7 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new)
        case LyXRC::RC_EXPORT_OVERWRITE:
        case LyXRC::RC_DEFAULT_DECIMAL_POINT:
        case LyXRC::RC_SCROLL_WHEEL_ZOOM:
+       case LyXRC::RC_CURSOR_WIDTH:
        case LyXRC::RC_LAST:
                break;
        }
@@ -3059,6 +3094,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_CURSOR_WIDTH:
+               str = _("Configure the width of the text cursor. Automatic zoom-controlled cursor width used when set to 0.");
+               break;
+
        case RC_SCROLL_BELOW_DOCUMENT:
                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;
@@ -3120,6 +3159,10 @@ string const LyXRC::getDescription(LyXRCTags tag)
                str = _("The font encoding used for the LaTeX2e fontenc package. T1 is highly recommended for non-English languages.");
                break;
 
+       case RC_FORCE_PAINT_SINGLE_CHAR:
+               str = _("Disable any kerning and ligatures for text drawing on screen.");
+               break;
+
        case RC_FILEFORMAT:
                break;