>>>>> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes:
Bo> Dear list, Attached is a patch that Bo> 1. add autoViewable to Format. This will return true, under Bo> windows, if a file extension is associated with a file. Bo> 2. If the format of a file is empty, but is autoViewable, because Bo> of a change in graph.C, it will appear in the menu. Bo> 3. File with empty format (but autoViewable) will be opened by Bo> windows' default viewer. I guess 'empty format' should mean 'empty viewer'. Besides that I like the principle of the patch. A few points: - please do not pass the mode as a string to autoOpenFile but an enum or a bool. - if "open" and "edit" are really separate operations, it probably means that canAutoOpen does not apply to "edit" (pdf comes to mind as an example). This would mean that we shall track autoViewable besides autoEditable. - A way to avoid adding autoViewable and autoEditable properties would be to set viewer and editor to "auto" as needed (after reading lyxrc.defaults). Then the code can call autoEditFile when viewer/editor is "auto". I think this would reduce the patch size. Bo> I would propse: Bo> 1. do not search for viewers at all under windows, to avoid Bo> problem 1. Actually, my configure.py view pdf files with gsview, Bo> which is simply ugly. (What will happen if there is no \format Bo> entries at all?) Agreed, this is what we shall do if this patch goes in. Bo> 2. find some way to show a disabled 'view->postscript' to tell the Bo> user lyx can handle postscript, just a viewer has not been Bo> installed. This is still a point on which I am not sure I agree :) Bo> Please: Bo> 1. test 2. check for cygwin I can't do any of these. Bo> 3. add autoconf things for -lshlwapi Isn't there a place already where one has to add a bunch of -lfoo to compile under windows? JMarc