I am trying to compile a LyX/Cygwin with native Qt support (no X11).
I had to make minimal changes to the Qt sources (configured using
-platform cygwin-g++-win32) and no changes to the LyX sources.
Only, I had to use -DQ_CYGWIN_WIN for compiling the stuff in frontend/qt2,
otherwise X11 calls are made even if configuring with --without-x.

The thing seems to work, but I am facing a problem with the file dialog.
When choosing File->Open I cannot see any directories or files listed,
only an entry for the parent dir ".." is present.

However, I can fill in a directory name ("Look in:", in the upper part)
and a file name ("File name:", in the lower part) and the file gets opened.

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?

Any hint about what and where looking would be much appreciated.

--
Enrico


Reply via email to