better user messages

Francois Gouget fgouget at free.fr
Sun May 19 17:38:16 CDT 2002


On Sun, 19 May 2002, Andreas Mohr wrote:


Index: dlls/gdi/freetype.c
===================================================================
RCS file: /home/wine/wine/dlls/gdi/freetype.c,v
retrieving revision 1.13
diff -u -r1.13 freetype.c
--- dlls/gdi/freetype.c	4 Apr 2002 15:30:29 -0000	1.13
+++ dlls/gdi/freetype.c	19 May 2002 21:14:36 -0000
@@ -452,9 +452,9 @@
     ft_handle = wine_dlopen("libfreetype.so", RTLD_NOW, NULL, 0);
     if(!ft_handle) {
         WINE_MESSAGE(
-      "Wine cannot find the FreeType font library.  To enable Wine to\n"
-      "use TrueType fonts please install a version of FreeType greater than\n"
-      "or equal to 2.0.5.\n"
+      "Wine could not find the FreeType font library.  To enable Wine to\n"
+      "use TrueType fonts please install a version of FreeType\n"
+      "(plus devel/header file package) greater than or equal to 2.0.5.\n"
       "http://www.freetype.org\n");
 	return FALSE;
     }
Index: dlls/wineps/truetype.c
===================================================================
RCS file: /home/wine/wine/dlls/wineps/truetype.c,v
retrieving revision 1.15
diff -u -r1.15 truetype.c
--- dlls/wineps/truetype.c	3 Apr 2002 20:02:39 -0000	1.15
+++ dlls/wineps/truetype.c	19 May 2002 21:14:37 -0000
@@ -593,9 +593,9 @@
     ft_handle = wine_dlopen("libfreetype.so", RTLD_NOW, NULL, 0);
     if(!ft_handle) {
         WINE_MESSAGE(
-      "Wine cannot find the FreeType font library.  To enable Wine to\n"
-      "use TrueType fonts please install a version of FreeType greater than\n"
-      "or equal to 2.0.5.\n"
+      "Wine could not find the FreeType font library.  To enable Wine to\n"
+      "use TrueType fonts please install a version of FreeType\n"
+      "(plus devel/header file package) greater than or equal to 2.0.5.\n"
       "http://www.freetype.org\n");
 	return TRUE;
     }

I disagree with this bit. This is printed by the Wine binary and the
development libraries and headers are not needed for running Wine. Such
a message should instead be printed by the configure script if it
detects that FreeType libraries or headers are missing.



Index: windows/win.c
===================================================================
RCS file: /home/wine/wine/windows/win.c,v
retrieving revision 1.183
diff -u -r1.183 win.c
--- windows/win.c	17 May 2002 02:55:48 -0000	1.183
+++ windows/win.c	19 May 2002 21:14:40 -0000
@@ -1590,7 +1590,10 @@
  */
 HWND WINAPI FindWindowA( LPCSTR className, LPCSTR title )
 {
-    HWND ret = FindWindowExA( 0, 0, className, title );
+    HWND ret;
+
+    WARN("app or wine makes use of FindWindow, which is bad programming since it can hang sometimes on Windows if a window is unresponsive. Use e.g. EnumerateWindows/SendMessageTimeout instead.\n");
+    ret = FindWindowExA( 0, 0, className, title );
     if (!ret) SetLastError (ERROR_CANNOT_FIND_WND_CLASS);
     return ret;
 }

I don't think this one is appropriate either. I agree that often
FindWindowA is used where there are better solutions. But we are not
going to be changing the way existing applications work so there does
not seem to be much point in printing this message.


--
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
                  Hiroshima '45 - Czernobyl '86 - Windows '95




More information about the wine-devel mailing list