Am Sonntag, 15. Oktober 2006 17:42 schrieb Joost Verburg:
> Hi,
> 
> When I add a viewer to lyxrc.defaults (using configure.py), it has no 
> effect whenever the file type is also associated with a viewer in 
> Windows. The viewer will be set to 'auto'.
> 
> It looks like this is done because there are still checks for UNIX 
> viewers in configure.py and the Windows settings should of course 
> override that.

Yes. These checks should become a fallback on all systems, and the auto 
settings should override them.

> However this makes it impossible to add a viewer in configure.py when 
> there already is a Windows viewer. I would like to be able to use a 
> script as viewer that does open the standard Windows viewer but works 
> around Adobe Readers' file locking. This will become a part of the 
> Windows installer, so adding an entry to the preferences is not an 
option.

Why don't you set the system application for pdf to the wrapper? That can 
also help in other cases.

> Possible solutions I can think of are:
> 
> * Getting rid of the whole viewer checks in configure.py on Windows (the 
> application names are only for UNIX anyway) so there is no need anymore 
> to override viewers by auto-detection.

That would not help, because the ability to autoopen is checked in LyX 
itself. Setting the viewer to "" would work, but that means to explicitly 
disable viewing this format.

> * Adding an option (maybe just a character before the filename) to 
> override the auto-detection.

Bad hack.

> Any comments or patches :) ?

What you see was done on purpose. In your case the installer should modify 
the global pdf association, probably only after user confirmation. If that 
is not wanted, then an entry to the preferences should be added. This can 
also be done by the installer.
The idea behind this is that all automatic settings should come from the 
OS. If for some reason you want a different application in LyX for a given 
file format (which is not unreasonable, e.g. you normally want to open 
images in irfanview, but for editing from LyX you prefer the gimp) then 
this is a personal setting that needs to be done explicitly in the 
preferences.

BTW. you should not modify configure.py but put windows specific things in 
lyxrc.dist instead.


Georg

Reply via email to