Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-28 Thread Enrico Forestieri
On Fri, Apr 28, 2006 at 11:38:45AM +0200, Jean-Marc Lasgouttes wrote: > > "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: > > Abdelrazak> In my tree, there is no libqt-mt.la for Qt3/mingw. Maybe > Abdelrazak> I've compiled as a dll. Qt4/mingw have no .la file either. > > So, nob

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-28 Thread Jean-Marc Lasgouttes
> "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: Enrico> I don't obtain an .la file when compiling Qt for mingw, but my Enrico> "compiler" (ie, g++ -mno-cygwin) leaves in the lib directory a Enrico> .prl file containing that info. This is the one tagged Enrico> 'mingw-'. So, can we

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-28 Thread Enrico Forestieri
On Fri, Apr 28, 2006 at 10:16:56AM +0200, Jean-Marc Lasgouttes wrote: > > "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: > > Enrico> Strictly speaking, the LDFLAGS thing is a quick hack in order > Enrico> to have configure test for Qt succeeding, otherwise libtool is > Enrico> able

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-28 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> In my tree, there is no libqt-mt.la for Qt3/mingw. Maybe Abdelrazak> I've compiled as a dll. Qt4/mingw have no .la file either. So, nobody has these la files... Enrico, what is the version of qt that gives you this?

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-28 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Which is not very difficult since you wrote something like that Georg> already. I know :) JMarc

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-28 Thread Jose' Matos
On Friday 28 April 2006 09:57, Angus Leeming wrote: > Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: > > Does Qt always have .la files for the cases that interest us? Does it > > mean that we could do without the check for X11? > > .la files are generated by libtool. Qt don't use libtool themselv

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-28 Thread Angus Leeming
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: > Does Qt always have .la files for the cases that interest us? Does it > mean that we could do without the check for X11? .la files are generated by libtool. Qt don't use libtool themselves, so most platforms won't have libqt.la files. My guess is

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-28 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: Enrico> Strictly speaking, the LDFLAGS thing is a quick hack in order Enrico> to have configure test for Qt succeeding, otherwise libtool is Enrico> able to figure out what libraries are needed from libqt.l

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-28 Thread Georg Baum
Jean-Marc Lasgouttes wrote: > You read my mind, Georg. Which is not very difficult since you wrote something like that already. Georg

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-28 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | Does Qt always have .la files for the cases that interest us? No. -- Lgb

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-28 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> 3. Remove all windows viewers and editors from Georg> lib/configure.py, but keep the formats. On startup, use your Georg> new function to query whether a format can be viewed/edited for Georg> all formats with empty viewers/editors and

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-28 Thread Jean-Marc Lasgouttes
> "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: Enrico> Strictly speaking, the LDFLAGS thing is a quick hack in order Enrico> to have configure test for Qt succeeding, otherwise libtool is Enrico> able to figure out what libraries are needed from libqt.la. Looks like we need a ver

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-28 Thread Jean-Marc Lasgouttes
> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes: >> - A way to avoid adding autoViewable and autoEditable properties >> would be to set viewer and editor to "auto" as needed (after >> reading lyxrc.defaults). Bo> Define "when needed". I was doing so in configure.py. I mean: - read lyxrc.defaul

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-28 Thread Georg Baum
Bo Peng wrote: > JMarc, before we continue this isAutoViewable business, you (we) > really need to decide what to do with configure.py. We can > > 1. use my "auto" (nobody seems to like it) patch, and change > isAutoViewable > > 2. disable \format for windows. We need basically a > > if os.nam

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Michael Gerz
Angus Leeming wrote: Hum, not sure... On my platform I don't have to set LDFLAGS manually and I would like it to stay that way. I don't understand why you have to set them Enrico but we should fix that. Because he links against qt.lib rather than qt.dll? (I seem to remember Michael Gerz r

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Bo Peng
> > Thank you. I (or you) can fix the enum{ View, Edit} thing after the > > patch is confirmed to work. > > Urgh... I forgot that... But I have added autoconf support for > -lshlwapi. Not a problem. I now have a combined patch and will post it after I test it later on windows. JMarc, before we co

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Andre Poenitz
On Thu, Apr 27, 2006 at 08:33:08AM -0500, Bo Peng wrote: > > It does make sense. Did you not read one my previous comments? I wrote that > > you should use view and edit, not open and edit > > Because the windows term for view is open. Unless it means 'Execute'... Andre'

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Enrico Forestieri
On Thu, Apr 27, 2006 at 09:45:02AM -0500, Bo Peng wrote: > > > Bo> 1. test 2. check for cygwin > > > > > > I can't do any of these. > > > > I am doing both. > > Thank you. I (or you) can fix the enum{ View, Edit} thing after the > patch is confirmed to work. Urgh... I forgot that... But I have ad

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Enrico Forestieri
On Thu, Apr 27, 2006 at 05:02:20PM +0200, Jean-Marc Lasgouttes wrote: > > "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: > > Enrico> Currently I have to add libraries using LDFLAGS at configure > Enrico> time: > > Enrico> LDFLAGS="-L$QTDIR/lib -lqt -lkernel32 -luser32 -lgdi32 > Enr

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Enrico Forestieri
On Thu, Apr 27, 2006 at 05:34:37PM +0200, Abdelrazak Younes wrote: > Angus Leeming a écrit : > >Abdelrazak Younes <[EMAIL PROTECTED]> writes: > >>Hum, not sure... On my platform I don't have to set LDFLAGS manually and > >>I would like it to stay that way. I don't understand why you have to set >

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Bo Peng
> I guess 'empty format' should mean 'empty viewer'. Besides that I like > the principle of the patch. Yes. > - please do not pass the mode as a string to autoOpenFile but an enum > or a bool. Will do. > - if "open" and "edit" are really separate operations, it probably > means that canAuto

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Abdelrazak Younes
Angus Leeming a écrit : Abdelrazak Younes <[EMAIL PROTECTED]> writes: Hum, not sure... On my platform I don't have to set LDFLAGS manually and I would like it to stay that way. I don't understand why you have to set them Enrico but we should fix that. Because he links against qt.lib rather th

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Angus Leeming
Abdelrazak Younes <[EMAIL PROTECTED]> writes: > Hum, not sure... On my platform I don't have to set LDFLAGS manually and > I would like it to stay that way. I don't understand why you have to set > them Enrico but we should fix that. Because he links against qt.lib rather than qt.dll? (I seem to

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Abdelrazak Younes
Bo Peng a écrit : Bo> 1. test 2. check for cygwin I can't do any of these. I am doing both. Thank you. I (or you) can fix the enum{ View, Edit} thing after the patch is confirmed to work. Bo> 3. add autoconf things for -lshlwapi Isn't there a place already where one has to add a bunch of -

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Jean-Marc Lasgouttes
> "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: Enrico> Currently I have to add libraries using LDFLAGS at configure Enrico> time: Enrico> LDFLAGS="-L$QTDIR/lib -lqt -lkernel32 -luser32 -lgdi32 Enrico> -lcomdlg32 \ -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid Enrico> -limm32 -lw

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Bo Peng
> > Bo> 1. test 2. check for cygwin > > > > I can't do any of these. > > I am doing both. Thank you. I (or you) can fix the enum{ View, Edit} thing after the patch is confirmed to work. > > Bo> 3. add autoconf things for -lshlwapi > > > > Isn't there a place already where one has to add a bunch o

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Enrico Forestieri
On Thu, Apr 27, 2006 at 02:28:46PM +0200, Jean-Marc Lasgouttes wrote: > > "Bo" == Bo Peng <[EMAIL PROTECTED]> writes: > Bo> Please: > > Bo> 1. test 2. check for cygwin > > I can't do any of these. I am doing both. > Bo> 3. add autoconf things for -lshlwapi > > Isn't there a place already

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Angus Leeming
Abdelrazak Younes <[EMAIL PROTECTED]> writes: > As there are only two options, a bool might be cleaner: > bool autoOpenFile(string const & filename, bool const edit = false) > { > command = edit? "edit": "open"; > } > But that's not very important anyway... Scott Meyers says that an enum is

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Bo Peng
> It does make sense. Did you not read one my previous comments? I wrote that > you should use view and edit, not open and edit Because the windows term for view is open. > Besides that, think about other platforms: They will probably not use a > string, so think of the above as the special windo

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Abdelrazak Younes
Bo Peng a écrit : (maybe after taking into account JMarc comments about string and enum)? That string (open or edit) will actually be used as command. I do not think it makes much sense to if (mode == OPEN) command = "open" else if (mode == EDIT) command = "edit") As there are only two o

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Georg Baum
Bo Peng wrote: > That string (open or edit) will actually be used as command. I do not > think it makes much sense to > > if (mode == OPEN) > command = "open" > else if (mode == EDIT) > command = "edit") > > and blah... It does make sense. Did you not read one my previous comments? I wrote

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Bo Peng
> (maybe after taking into account JMarc > comments about string and enum)? That string (open or edit) will actually be used as command. I do not think it makes much sense to if (mode == OPEN) command = "open" else if (mode == EDIT) command = "edit") and blah... Bo

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Abdelrazak Younes
Jean-Marc Lasgouttes a écrit : "Bo" == Bo Peng <[EMAIL PROTECTED]> writes: Bo> 1. test 2. check for cygwin I can't do any of these. As you two seem to have reached an agreement about what was the way to go, why don't you commit Bo (maybe after taking into account JMarc comments about strin

Re: [Again-Updated-PATCH] Win32 auto-view

2006-04-27 Thread Jean-Marc Lasgouttes
> "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 cha

[Again-Updated-PATCH] Win32 auto-view

2006-04-26 Thread Bo Peng
Dear list, Attached is a patch that 1. add autoViewable to Format. This will return true, under windows, if a file extension is associated with a file. 2. If the format of a file is empty, but is autoViewable, because of a change in graph.C, it will appear in the menu. 3. File with empty format