Am Freitag, 10. Februar 2006 17:17 schrieb Enrico Forestieri:
> I am trying to compile a LyX/Cygwin with native Qt support (no X11).

Why? Because of the linker problems of mingw?

> I tried using a native file dialog by the following patch:
> 
> --- src/frontends/qt2/FileDialog.C.orig 2005-01-19 16:03:30.000000000 
+0100
> +++ src/frontends/qt2/FileDialog.C      2006-02-10 14:45:56.000000000 
+0100
> @@ -30,7 +30,7 @@
>   *
>   * Therefore there is a tradeoff in enabling or disabling this (JMarc)
>   */
> -#ifdef Q_WS_MACX
> +#if defined(Q_WS_MACX) || defined(Q_CYGWIN_WIN)
>  #define USE_NATIVE_FILEDIALOG 1
>  #endif
> 
> 
> With this patch I am able to see files and directories, but when 
choosing
> a file I am presented with an empty document and the title bar shows
> something like "LyX:.../C:\work\test.lyx" hinting to a wrong path issue.
> 
> I am not sure if this is a problem in LyX or in Qt and I am trying to 
find
> my way in the src/support/os_... files. Packaging is posix, so may be I 
am
> missing something from os_win32.C?

Yes. AFAIK LyX does see unix style paths /x/y/z under cygwin, but you now 
changed the file dialog so that it returns windows style paths. I think 
that it would work if you translate the windows style path in 
FileDialog::save etc. to a cygwin style path before returning. You maybe 
need a mixture of os_cygwin.C and os_win32.C to do that.


Georg

Reply via email to