]> git.lyx.org Git - features.git/commit
A go at creating a prefs2prefs framework. There's a main file, prefs2prefs.py, and...
authorRichard Heck <rgheck@comcast.net>
Fri, 17 Sep 2010 14:44:38 +0000 (14:44 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 17 Sep 2010 14:44:38 +0000 (14:44 +0000)
commit851d01721fd415884967561c934d315ffa7d7953
treedabfa62d8fad84b6c2040d07ce8dd0dd248631bd
parentd5e6b695dc1726d44b469e5847cf7318fa4ee95b
A go at creating a prefs2prefs framework. There's a main file, prefs2prefs.py, and two subsidiary files,
prefs2prefs_lfuns.py and prefs2prefs_prefs.py. I've organized it this way because, in many ways, these are
 the same task. It's very line-by-line, unlike lyx2lyx and layout2layout, where things can be more "global".
So we read the file, line by line, and give a bunch of converter functions a chance to see if they want to
modify that line.

The converter functions are all in the subsidiary files. (Only the lfun one has anything in it now.) They
take a line as argument and return a list: (Bool, NewLine), where the Bool says if we've modified anything
and the NewLine is the new line, if so.

The format of the existing files is format 0, and we'll introduce new format numbers as we proceed,
just as with layout2layout. So the conversion from format 0 to format 1 will be huge; others will
generally be simple.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35426 a592a061-630c-0410-9148-cb99ea01b6c8
lib/scripts/prefs2prefs.py [new file with mode: 0644]
lib/scripts/prefs2prefs_lfuns.py [new file with mode: 0644]
lib/scripts/prefs2prefs_prefs.py [new file with mode: 0644]