Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-26 Thread Enrico Forestieri
On Tue, Apr 25, 2006 at 09:06:10PM -0500, Bo Peng wrote: > I guess windows is doing the following: > > 1. check HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ > FileExts\.ps\OpenWithList > > 2. from MRUList know a is the application, get gsview32.exe > > 3. go to HK

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-26 Thread Joost Verburg
Jean-Marc Lasgouttes wrote: It looks like a good plan. What is really strange though is that the is no API to do this really simple task without reading the registry. This is wrong. The system for Windows file associations has quite some options and does not work this way. It makes no sense

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-26 Thread Georg Baum
Jean-Marc Lasgouttes wrote: > So this noexport means "no export from lyx format", right? Yes. > Wouldn't it be better (with a similar patch) to tag the formats that > are relevant to the whole document and formats that are relevant to > objects? I would only tag the formats that are relevant to

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-26 Thread Jean-Marc Lasgouttes
> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes: Bo> Dear list, We have had a long discussion regarding this auto view Bo> business. Here is my second offer: Bo> 1. apply the attached patch. This is a slightly modified version Bo> of my patch + Enrico's cygwin stuff. The src/ part of the patch

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-26 Thread Jean-Marc Lasgouttes
> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes: Bo> I guess windows is doing the following: Bo> 1. check Bo> HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ Bo> FileExts\.ps\OpenWithList Bo> 2. from MRUList know a is the application, get gsview32.exe Bo> 3. go to HKEY_CL

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-26 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> I just finished the patch. It is tested and works. It adds a Georg> "noexport" flag to the format definition and removes the Georg> hardcoded exceptions for some image formats. With this patch Georg> you don't need to change configure.

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-26 Thread Abdelrazak Younes
Bo Peng a écrit : I am searching around, and will provide a patch that disable this menu item when no viewer is linked to ps format (and to pdf). http://www.informit.com/articles/article.asp?p=415193&seqNum=6 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shel

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-25 Thread Bo Peng
> I am searching around, and will provide > a patch that disable this menu item when no viewer is linked to ps > format (and to pdf). http://www.informit.com/articles/article.asp?p=415193&seqNum=6 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersgu

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-25 Thread Bo Peng
Dear list, We have had a long discussion regarding this auto view business. Here is my second offer: 1. apply the attached patch. This is a slightly modified version of my patch + Enrico's cygwin stuff. With this patch, viewer for pdf/ps will be handled to windows *completely*. When ghostview i

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-25 Thread Abdelrazak Younes
Georg Baum a écrit : Abdelrazak Younes wrote: It can be *much* worse, believe me... A Windows system can be broken in so many ways that we have somewhat to live with that. Not our job. LyX should do one thing, and that well. This thing happens to be document preparation. Reparing a broken sys

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-25 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Abdelrazak Younes wrote: >> It can be *much* worse, believe me... A Windows system can be >> broken in so many ways that we have somewhat to live with that. Georg> Not our job. LyX should do one thing, and that well. This thing Georg>

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-25 Thread Georg Baum
Abdelrazak Younes wrote: > It can be *much* worse, believe me... A Windows system can be broken in > so many ways that we have somewhat to live with that. Not our job. LyX should do one thing, and that well. This thing happens to be document preparation. Reparing a broken system is definitely not

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-25 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> I can think of many such example in windows. Indeed even Abdelrazak> when you remove an application, the association of the Abdelrazak> extension with that application is not removed. How

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-25 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> I can think of many such example in windows. Indeed even Abdelrazak> when you remove an application, the association of the Abdelrazak> extension with that application is not removed. How broken can a system be? Not

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-25 Thread Georg Baum
Abdelrazak Younes wrote: > Georg Baum a écrit : >> No, not all are needed. Somebody who uses exclusively pdflatex does >> neither need DVI nor PS. > > IMHO, that's not true, at least for me. I use pdflatex only when I want > to do a final export. For casual checking, view dvi is much faster so I

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-25 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : "Bo" == Bo Peng <[EMAIL PROTECTED]> writes: The patch will not change that, I overlooked this problem. This certainly needs discussion: Do we really want View->XYZ entries for lots of formats that no user uses? Imagine a user who has no DVI viewer and does not wa

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-25 Thread Abdelrazak Younes
Georg Baum a écrit : Bo Peng wrote: The basic ones, dvi/ps/all pdfs are certainly needed, and I do not think view->... is now over-crowded. No, not all are needed. Somebody who uses exclusively pdflatex does neither need DVI nor PS. IMHO, that's not true, at least for me. I use pdflatex onl

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-25 Thread Georg Baum
Jean-Marc Lasgouttes wrote: > Bo, I thought again about that, and I do not think I agree with you. > Can you think of a single case where the user has a real windows > application to view a format and this format is not declared in > windows already? Only broken installations. But these could be

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-25 Thread Georg Baum
Bo Peng wrote: > The basic ones, dvi/ps/all pdfs are certainly needed, and I do not > think view->... is now over-crowded. No, not all are needed. Somebody who uses exclusively pdflatex does neither need DVI nor PS. > Then, I am afraid that our patches do not overlap. I have to do > something to

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-25 Thread Jean-Marc Lasgouttes
> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes: >> The patch will not change that, I overlooked this problem. This >> certainly needs discussion: Do we really want View->XYZ entries for >> lots of formats that no user uses? Imagine a user who has no DVI >> viewer and does not want one. Why shoul

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-24 Thread Bo Peng
> The patch will not change that, I overlooked this problem. This certainly > needs discussion: Do we really want View->XYZ entries for lots of formats > that no user uses? Imagine a user who has no DVI viewer and does not want > one. Why should he have View->DVI? I think the suggested canOpen() >

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-24 Thread Georg Baum
Am Montag, 24. April 2006 20:49 schrieb Bo Peng: > What I am concerned with is that if, for example, acrobat reader is > not found, the viewer for pdf will be empty, and view->pdflatex etc > will be gone. Will your patch change this behavior? (I used "auto" > viewer to avoid this problem.) The pa

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-24 Thread Bo Peng
> A flag that tells that this format should not be used for exporting (and > neither for viewing, since only exportable formats can be viewed) What I am concerned with is that if, for example, acrobat reader is not found, the viewer for pdf will be empty, and view->pdflatex etc will be gone. Will

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-24 Thread Georg Baum
Am Montag, 24. April 2006 19:18 schrieb Bo Peng: > I am sorry but the patch is too big to be digested easily. Could you explain Just after hitting "send" I realized that I forgot to attach the log, but then I had to leave. Here it comes. > 1. what is noexport? A flag that tells that this form

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-24 Thread Bo Peng
> I just finished the patch. It is tested and works. It adds a "noexport" flag > to the format definition and removes the hardcoded exceptions for some > image formats. With this patch you don't need to change configure.py > anymore. > This is going in tomorrow if I don't get objections. I am sorr

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-24 Thread Angus Leeming
Georg Baum <[EMAIL PROTECTED]> writes: > I just finished the patch. It is tested and works. It adds a "noexport" flag > to the format definition and removes the hardcoded exceptions for some > image formats. With this patch you don't need to change configure.py > anymore. > This is going in tomorro

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-24 Thread Georg Baum
Bo Peng wrote: >> Bo> The "auto" viewer is just a walk around of lyx' current behavior, >> Bo> since if there is no viewer specified for pdf, view->pdflatex etc >> Bo> will disappear. >> >> But there is no point in keeping the old behaviour and working around >> it using configure.py tricks. > >

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-24 Thread Bo Peng
> Bo> The "auto" viewer is just a walk around of lyx' current behavior, > Bo> since if there is no viewer specified for pdf, view->pdflatex etc > Bo> will disappear. > > But there is no point in keeping the old behaviour and working around > it using configure.py tricks. Then, we should change Men

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-24 Thread Jean-Marc Lasgouttes
> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes: Bo> I still do not understand why you insist on a 'canOpenFile' Bo> approach. Let *windows* do this! it is none of Lyx' business. If a Bo> user wants to view a file, fine, let he/she view it. Windows will Bo> use the appropriate viewer, or let the

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-24 Thread Enrico Forestieri
On Mon, Apr 24, 2006 at 08:41:14AM -0500, Bo Peng wrote: > > 2) iterate over the viewer/editor list and overwrite all those for > > which canOpenFile (see other message) returns true the command > > with "auto" > > I still do not understand why you insist on a 'canOpenFile' approach.

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-24 Thread Bo Peng
> 2) iterate over the viewer/editor list and overwrite all those for > which canOpenFile (see other message) returns true the command > with "auto" I still do not understand why you insist on a 'canOpenFile' approach. Let *windows* do this! it is none of Lyx' business. If a user wants

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-24 Thread Jean-Marc Lasgouttes
> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes: >> Please, instead of >> >> #ifdef _WIN32 #ifndef _WIN32 >> >> use >> >> #if defined(_WIN32) || defined(__CYGWIN__) #if !defined(_WIN32) && >> !defined(__CYGWIN__) >> >> in this code, as it will also work on Cygwin. Bo> Please fix that yoursel

Re: [PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-22 Thread Enrico Forestieri
On Sat, Apr 22, 2006 at 09:28:50AM -0500, Bo Peng wrote: > > Please, instead of > > > > #ifdef _WIN32 > > #ifndef _WIN32 > > > > use > > > > #if defined(_WIN32) || defined(__CYGWIN__) > > #if !defined(_WIN32) && !defined(__CYGWIN__) > > > > in this code, as it will also work on Cygwin. > > Please

[PATCH] configure.py patch for "auto" viewer/editor under windows.

2006-04-22 Thread Bo Peng
> Please, instead of > > #ifdef _WIN32 > #ifndef _WIN32 > > use > > #if defined(_WIN32) || defined(__CYGWIN__) > #if !defined(_WIN32) && !defined(__CYGWIN__) > > in this code, as it will also work on Cygwin. Please fix that yourself, and test this feature with the attached configure.py patch. My w