X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Fscripts%2Fprefs2prefs_prefs.py;h=d3a70d26574eb9d550530f533c92c63824ee9e64;hb=0b56495e48437bec97117de8c6ac1825a8cf3fb1;hp=6bbb8ac0bc5471b74d3c5ec2c5f9cc9ced2826c4;hpb=5fc2662b1301a8e04db0fa8695e06b363c1de60e;p=lyx.git diff --git a/lib/scripts/prefs2prefs_prefs.py b/lib/scripts/prefs2prefs_prefs.py index 6bbb8ac0bc..d3a70d2657 100644 --- a/lib/scripts/prefs2prefs_prefs.py +++ b/lib/scripts/prefs2prefs_prefs.py @@ -4,7 +4,7 @@ # This file is part of LyX, the document processor. # Licence details can be found in the file COPYING. -# author Richard Heck +# author Richard Kimberly Heck # Full author contact details are available in file CREDITS @@ -129,6 +129,18 @@ # Add ct_markup_copied. # No convergence necessary. +# Incremented to format 33, by sanda +# Add \citation_search, \citation_search_pattern +# and \citation_search_view. +# No conversion necessary. + +# Incremented to format 34, by yuriy +# Rename *.kmap files for Cyrillic languages + +# Incremented to format 35, by spitz +# \set_color now takes three arguments +# \set_color lyxname x11hexname x11darkhexname + # NOTE: The format should also be updated in LYXRC.cpp and # in configure.py. @@ -433,6 +445,26 @@ def remove_use_pixmap_cache(line): return no_match return (True, "") +def rename_cyrillic_kmap_files(line): + line = line.lower() + if not (line.startswith("\\kbmap_primary ") + or line.startswith("\\kbmap_secondary ")): + return no_match + line = line.replace('"bg-bds-1251"', '"bulgarian"') + line = line.replace('"koi8-r"', '"russian"') + line = line.replace('"koi8-u"', '"ukrainian"') + return (True, line) + +def add_dark_color(line): + if not line.lower().startswith("\\set_color "): + return no_match + colre = re.compile(r'^\\set_color\s+("[^"]+")\s+("[^"]+")\s*$', re.IGNORECASE) + m = colre.match(line) + if not m: + return no_match + line += " " + m.group(2) + return (True, line) + # End conversions for LyX 2.3 to 2.4 #################################### @@ -479,5 +511,8 @@ conversions = [ [ 29, [remove_use_pixmap_cache]], [ 30, []], [ 31, []], - [ 32, []] + [ 32, []], + [ 33, []], + [ 34, [rename_cyrillic_kmap_files]], + [ 35, [add_dark_color]] ]