Remove LyXRC option force_paint_single_char

It was not honored anymore.
This commit is contained in:
Jean-Marc Lasgouttes 2014-07-08 23:12:09 +02:00
parent 4bd5a7e883
commit 9d5c947110
5 changed files with 24 additions and 34 deletions

View File

@ -31,8 +31,8 @@ What is done:
* Re-implement cursorX and getPosNearX using row elements. * Re-implement cursorX and getPosNearX using row elements.
* Do not honor lyxrc.force_paint_single_char anymore. This is a * Get rid of lyxrc.force_paint_single_char. This was a workaround that
workaround that is not necessary anymore. is not necessary anymore.
* Implement proper string metrics computation (with cache). Remove * Implement proper string metrics computation (with cache). Remove
useless workarounds which disable kerning and ligatures. useless workarounds which disable kerning and ligatures.
@ -53,7 +53,4 @@ What is done:
Next steps: Next steps:
* Get rid of LyXRC::force_paint_single_char, which is not used anymore
in the source.
* Maybe get rid of LyXRC::rtl_support, which does not have a real use case. * Maybe get rid of LyXRC::rtl_support, which does not have a real use case.

View File

@ -1479,7 +1479,7 @@ if __name__ == '__main__':
lyx_check_config = True lyx_check_config = True
lyx_kpsewhich = True lyx_kpsewhich = True
outfile = 'lyxrc.defaults' outfile = 'lyxrc.defaults'
lyxrc_fileformat = 15 lyxrc_fileformat = 16
rc_entries = '' rc_entries = ''
lyx_keep_temps = False lyx_keep_temps = False
version_suffix = '' version_suffix = ''

View File

@ -63,6 +63,13 @@
# New RC default_otf_view_format # New RC default_otf_view_format
# No conversion necessary. # No conversion necessary.
# Incremented to format 15, by prannoy
# Add fullscreen_statusbar
# No conversion necessary.
# Incremented to format 16, by lasgouttes
# Remove force_paint_single_char rc.
# NOTE: The format should also be updated in LYXRC.cpp and # NOTE: The format should also be updated in LYXRC.cpp and
# in configure.py. # in configure.py.
@ -306,6 +313,17 @@ def mac_cursor_movement(line):
#################################### ####################################
#################################
# Conversions from LyX 2.1 to 2.2
def remove_force_paint_single_char(line):
if not line.lower().startswith("\\force_paint_single_char"):
return no_match
return (True, "")
# End conversions for LyX 2.1 to 2.2
####################################
conversions = [ conversions = [
[ 1, [ # there were several conversions for format 1 [ 1, [ # there were several conversions for format 1
export_menu, export_menu,
@ -327,5 +345,6 @@ conversions = [
[ 12, []], [ 12, []],
[ 13, [mac_cursor_movement]], [ 13, [mac_cursor_movement]],
[ 14, []], [ 14, []],
[ 15, []] [ 15, []],
[ 16, [remove_force_paint_single_char]]
] ]

View File

@ -58,7 +58,7 @@ namespace {
// The format should also be updated in configure.py, and conversion code // The format should also be updated in configure.py, and conversion code
// should be added to prefs2prefs_prefs.py. // should be added to prefs2prefs_prefs.py.
static unsigned int const LYXRC_FILEFORMAT = 15; // prannoy: statusbar on/off in full screen static unsigned int const LYXRC_FILEFORMAT = 16; // lasgouttes: remove \\force_paint_single_char
// when adding something to this array keep it sorted! // when adding something to this array keep it sorted!
LexerKeyword lyxrcTags[] = { LexerKeyword lyxrcTags[] = {
@ -106,7 +106,6 @@ LexerKeyword lyxrcTags[] = {
{ "\\example_path", LyXRC::RC_EXAMPLEPATH }, { "\\example_path", LyXRC::RC_EXAMPLEPATH },
{ "\\export_overwrite", LyXRC::RC_EXPORT_OVERWRITE }, { "\\export_overwrite", LyXRC::RC_EXPORT_OVERWRITE },
{ "\\font_encoding", LyXRC::RC_FONT_ENCODING }, { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
{ "\\force_paint_single_char", LyXRC::RC_FORCE_PAINT_SINGLE_CHAR },
{ "\\format", LyXRC::RC_FILEFORMAT }, { "\\format", LyXRC::RC_FILEFORMAT },
{ "\\forward_search_dvi", LyXRC::RC_FORWARD_SEARCH_DVI }, { "\\forward_search_dvi", LyXRC::RC_FORWARD_SEARCH_DVI },
{ "\\forward_search_pdf", LyXRC::RC_FORWARD_SEARCH_PDF }, { "\\forward_search_pdf", LyXRC::RC_FORWARD_SEARCH_PDF },
@ -447,10 +446,6 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format)
if (!lexrc.isOK()) if (!lexrc.isOK())
return ReadError; return ReadError;
// default for current rowpainter capabilities
//force_paint_single_char = true;
force_paint_single_char = false;
// format prior to 2.0 and introduction of format tag // format prior to 2.0 and introduction of format tag
unsigned int format = 0; unsigned int format = 0;
@ -556,10 +551,6 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format)
lexrc >> fontenc; lexrc >> fontenc;
break; break;
case RC_FORCE_PAINT_SINGLE_CHAR:
lexrc >> force_paint_single_char;
break;
case RC_PRINTER: case RC_PRINTER:
lexrc >> printer; lexrc >> printer;
break; break;
@ -2222,14 +2213,6 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
if (tag != RC_LAST) if (tag != RC_LAST)
break; 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" os << "\n#\n"
<< "# FILE SECTION ######################################\n" << "# FILE SECTION ######################################\n"
<< "#\n\n"; << "#\n\n";
@ -2975,7 +2958,6 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new)
case LyXRC::RC_ESC_CHARS: case LyXRC::RC_ESC_CHARS:
case LyXRC::RC_EXAMPLEPATH: case LyXRC::RC_EXAMPLEPATH:
case LyXRC::RC_FONT_ENCODING: case LyXRC::RC_FONT_ENCODING:
case LyXRC::RC_FORCE_PAINT_SINGLE_CHAR:
case LyXRC::RC_FILEFORMAT: case LyXRC::RC_FILEFORMAT:
case LyXRC::RC_GROUP_LAYOUTS: case LyXRC::RC_GROUP_LAYOUTS:
case LyXRC::RC_HUNSPELLDIR_PATH: case LyXRC::RC_HUNSPELLDIR_PATH:
@ -3229,10 +3211,6 @@ string const LyXRC::getDescription(LyXRCTags tag)
str = _("The font encoding used for the LaTeX2e fontenc package. T1 is highly recommended for non-English languages."); str = _("The font encoding used for the LaTeX2e fontenc package. T1 is highly recommended for non-English languages.");
break; break;
case RC_FORCE_PAINT_SINGLE_CHAR:
str = _("Disable any kerning and ligatures for text drawing on screen.");
break;
case RC_FILEFORMAT: case RC_FILEFORMAT:
break; break;

View File

@ -80,7 +80,6 @@ public:
RC_EXAMPLEPATH, RC_EXAMPLEPATH,
RC_EXPORT_OVERWRITE, RC_EXPORT_OVERWRITE,
RC_FONT_ENCODING, RC_FONT_ENCODING,
RC_FORCE_PAINT_SINGLE_CHAR,
RC_FILEFORMAT, RC_FILEFORMAT,
RC_FORWARD_SEARCH_DVI, RC_FORWARD_SEARCH_DVI,
RC_FORWARD_SEARCH_PDF, RC_FORWARD_SEARCH_PDF,
@ -551,9 +550,6 @@ public:
}; };
/// ///
ScrollWheelZoom scroll_wheel_zoom; ScrollWheelZoom scroll_wheel_zoom;
/// FIXME: this shall be removed, as the source does not refer
/// to it anymore.
bool force_paint_single_char;
/// ///
int cursor_width; int cursor_width;
/// One of: yes, no, ask /// One of: yes, no, ask