Changeset 10319 for trunk/src


Ignore:
Timestamp:
Nov 14, 2003, 2:44:11 PM (22 years ago)
Author:
sandervl
Message:

Updates

Location:
trunk/src/user32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/inituser32.cpp

    r10316 r10319  
    1 /* $Id: inituser32.cpp,v 1.17 2003-11-12 14:10:19 sandervl Exp $ */
     1/* $Id: inituser32.cpp,v 1.18 2003-11-14 13:44:10 sandervl Exp $ */
    22/*
    33 * USER32 DLL entry point
     
    3030#define  INCL_DOSERRORS
    3131#define  INCL_WINSHELLDATA
     32#define  INCL_GPI
     33#define  INCL_WINERRORS
    3234#include <os2wrap.h>    //Odin32 OS/2 api wrappers
    3335#include <stdlib.h>
     
    7981  HKEY  hkFonts,hkOS2Fonts;
    8082  char  buffer[512];
    81   UINT  len = GetWindowsDirectoryA( NULL, 0 );
     83  UINT  len;
    8284 
    8385  if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, REGPATH ,0, KEY_ALL_ACCESS, &hkFonts) == 0)
     
    9294           ++dwIndex, sizeOfSubKeyName = 254, sizeOfDataArray = 511)
    9395      {
    94          //Check OS/2 INI profile for font entry
    95          if (!PrfQueryProfileString(HINI_PROFILE, "PM_Fonts", dataArray,
    96                             NULL, (PVOID)subKeyName, (LONG)sizeof(subKeyName)))
     96         HDIR          hdirFindHandle = HDIR_CREATE;
     97         FILEFINDBUF3  FindBuffer     = {0};     
     98         ULONG         ulResultBufLen = sizeof(FILEFINDBUF3);
     99         ULONG         ulFindCount    = 1, ret;       
     100         APIRET        rc             = NO_ERROR;
     101
     102         GetWindowsDirectoryA( buffer, sizeof(buffer) );
     103         wsnprintfA( buffer, sizeof(buffer), "%s\\%s\\%s", buffer, FONTSDIRECTORY, dataArray );
     104
     105         rc = DosFindFirst( buffer, &hdirFindHandle, FILE_NORMAL,&FindBuffer, ulResultBufLen, &ulFindCount, FIL_STANDARD);
     106         //Check that file actaully exist
     107         if ( rc == NO_ERROR  && !(FindBuffer.attrFile & FILE_DIRECTORY))
    97108         {
    98            HDIR          hdirFindHandle = HDIR_CREATE;
    99            FILEFINDBUF3  FindBuffer     = {0};     
    100            ULONG         ulResultBufLen = sizeof(FILEFINDBUF3);
    101            ULONG         ulFindCount    = 1;       
    102            APIRET        rc             = NO_ERROR;
    103 
    104            dprintf(("Migrating font %s to OS/2",dataArray));
    105 
    106            GetWindowsDirectoryA( buffer, len + 1 );
    107            wsnprintfA( buffer, sizeof(buffer), "%s\\%s\\%s", buffer, FONTSDIRECTORY, dataArray );
    108 
    109            rc = DosFindFirst( buffer, &hdirFindHandle, FILE_NORMAL,&FindBuffer, ulResultBufLen, &ulFindCount, FIL_STANDARD);
    110 
    111            //Check that file actaully exist
    112            if ( rc == NO_ERROR  && !(FindBuffer.attrFile & FILE_DIRECTORY))
    113            {
    114               PrfWriteProfileString(HINI_PROFILE,"PM_Fonts",dataArray, buffer);   
    115               DosFindClose(hdirFindHandle);
    116            }
    117         }
     109            //Check OS/2 INI profile for font entry
     110            len = PrfQueryProfileString(HINI_PROFILE, "PM_Fonts", dataArray,
     111                                        NULL, (PVOID)subKeyName, (LONG)sizeof(subKeyName));
     112
     113            //If it doesn't exist OR if it's outdated
     114            if(len == 0 || strcmp(subKeyName, buffer))
     115            {
     116              dprintf(("Migrating font %s to OS/2",dataArray));
     117
     118              ret = GpiLoadFonts(0, buffer);
     119              if(ret == FALSE) {
     120                  dprintf(("GpiLoadFonts %s failed with %x", buffer, WinGetLastError(0)));
     121              }
     122            }
     123         }
     124         DosFindClose(hdirFindHandle);
    118125      }
    119126      RegCloseKey(hkFonts);
  • trunk/src/user32/win32wbase.cpp

    r10316 r10319  
    1 /* $Id: win32wbase.cpp,v 1.380 2003-11-12 14:10:20 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.381 2003-11-14 13:44:11 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    476476        }
    477477    }
    478     if (cs->dwExStyle & WS_EX_DLGMODALFRAME) dwStyle &= ~WS_THICKFRAME;
    479478
    480479    //WinZip 8.0 crashes when a dialog created after opening a zipfile receives
Note: See TracChangeset for help on using the changeset viewer.