No need to change LyX.py everytime there is a file format change

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24684 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
José Matox 2008-05-08 10:01:38 +00:00
parent 19028adf55
commit 999889716a

View File

@ -79,9 +79,20 @@ format_relation = [("0_06", [200], minor_versions("0.6" , 4)),
("1_2", [220], minor_versions("1.2" , 4)),
("1_3", [221], minor_versions("1.3" , 7)),
("1_4", range(222,246), minor_versions("1.4" , 5)),
("1_5", range(246,277), minor_versions("1.5" , 2)),
("1_6", range(277,333), minor_versions("1.6" , 0))]
("1_5", range(246,277), minor_versions("1.5" , 5)),
("1_6", [] , minor_versions("1.6" , 0))]
####################################################################
# This is useful just for development versions #
# if the list of supported formats is empty get it from last step #
if not format_relation[-1][1]:
step, mode = format_relation[-1][0], "convert"
convert = getattr(__import__("lyx_" + step), mode)
format_relation[-1] = (step,
[conv[0] for conv in convert],
format_relation[-1][2])
# #
####################################################################
def formats_list():
" Returns a list with supported file formats."