Index: trunk/src/user32/inituser32.cpp
===================================================================
--- trunk/src/user32/inituser32.cpp	(revision 10316)
+++ trunk/src/user32/inituser32.cpp	(revision 10319)
@@ -1,3 +1,3 @@
-/* $Id: inituser32.cpp,v 1.17 2003-11-12 14:10:19 sandervl Exp $ */
+/* $Id: inituser32.cpp,v 1.18 2003-11-14 13:44:10 sandervl Exp $ */
 /*
  * USER32 DLL entry point
@@ -30,4 +30,6 @@
 #define  INCL_DOSERRORS
 #define  INCL_WINSHELLDATA
+#define  INCL_GPI
+#define  INCL_WINERRORS
 #include <os2wrap.h>    //Odin32 OS/2 api wrappers
 #include <stdlib.h>
@@ -79,5 +81,5 @@
   HKEY  hkFonts,hkOS2Fonts;
   char  buffer[512];
-  UINT  len = GetWindowsDirectoryA( NULL, 0 );
+  UINT  len;
   
   if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, REGPATH ,0, KEY_ALL_ACCESS, &hkFonts) == 0)
@@ -92,28 +94,33 @@
            ++dwIndex, sizeOfSubKeyName = 254, sizeOfDataArray = 511)
       {
-         //Check OS/2 INI profile for font entry
-         if (!PrfQueryProfileString(HINI_PROFILE, "PM_Fonts", dataArray,
-                            NULL, (PVOID)subKeyName, (LONG)sizeof(subKeyName)))
+         HDIR          hdirFindHandle = HDIR_CREATE;
+         FILEFINDBUF3  FindBuffer     = {0};      
+         ULONG         ulResultBufLen = sizeof(FILEFINDBUF3);
+         ULONG         ulFindCount    = 1, ret;       
+         APIRET        rc             = NO_ERROR; 
+
+         GetWindowsDirectoryA( buffer, sizeof(buffer) );
+         wsnprintfA( buffer, sizeof(buffer), "%s\\%s\\%s", buffer, FONTSDIRECTORY, dataArray );
+
+         rc = DosFindFirst( buffer, &hdirFindHandle, FILE_NORMAL,&FindBuffer, ulResultBufLen, &ulFindCount, FIL_STANDARD);
+         //Check that file actaully exist 
+         if ( rc == NO_ERROR  && !(FindBuffer.attrFile & FILE_DIRECTORY))
          {
-           HDIR          hdirFindHandle = HDIR_CREATE;
-           FILEFINDBUF3  FindBuffer     = {0};      
-           ULONG         ulResultBufLen = sizeof(FILEFINDBUF3);
-           ULONG         ulFindCount    = 1;       
-           APIRET        rc             = NO_ERROR; 
-
-           dprintf(("Migrating font %s to OS/2",dataArray));
-
-           GetWindowsDirectoryA( buffer, len + 1 );
-           wsnprintfA( buffer, sizeof(buffer), "%s\\%s\\%s", buffer, FONTSDIRECTORY, dataArray );
-
-           rc = DosFindFirst( buffer, &hdirFindHandle, FILE_NORMAL,&FindBuffer, ulResultBufLen, &ulFindCount, FIL_STANDARD);
-
-           //Check that file actaully exist 
-  	   if ( rc == NO_ERROR  && !(FindBuffer.attrFile & FILE_DIRECTORY))
-  	   {
-              PrfWriteProfileString(HINI_PROFILE,"PM_Fonts",dataArray, buffer);   
-	      DosFindClose(hdirFindHandle);
-           }
-        } 
+            //Check OS/2 INI profile for font entry
+            len = PrfQueryProfileString(HINI_PROFILE, "PM_Fonts", dataArray,
+                                        NULL, (PVOID)subKeyName, (LONG)sizeof(subKeyName));
+
+            //If it doesn't exist OR if it's outdated
+            if(len == 0 || strcmp(subKeyName, buffer))
+            {
+              dprintf(("Migrating font %s to OS/2",dataArray));
+
+              ret = GpiLoadFonts(0, buffer);
+              if(ret == FALSE) {
+                  dprintf(("GpiLoadFonts %s failed with %x", buffer, WinGetLastError(0)));
+              }
+            }
+         } 
+         DosFindClose(hdirFindHandle);
       }
       RegCloseKey(hkFonts);
Index: trunk/src/user32/win32wbase.cpp
===================================================================
--- trunk/src/user32/win32wbase.cpp	(revision 10316)
+++ trunk/src/user32/win32wbase.cpp	(revision 10319)
@@ -1,3 +1,3 @@
-/* $Id: win32wbase.cpp,v 1.380 2003-11-12 14:10:20 sandervl Exp $ */
+/* $Id: win32wbase.cpp,v 1.381 2003-11-14 13:44:11 sandervl Exp $ */
 /*
  * Win32 Window Base Class for OS/2
@@ -476,5 +476,4 @@
         }
     }
-    if (cs->dwExStyle & WS_EX_DLGMODALFRAME) dwStyle &= ~WS_THICKFRAME;
 
     //WinZip 8.0 crashes when a dialog created after opening a zipfile receives
