Changeset 1394 for trunk/dll/fonts.c


Ignore:
Timestamp:
Feb 5, 2009, 5:17:25 AM (17 years ago)
Author:
Steven Levine
Message:

Ticket 340: Convert GetPString to use STRINGTABLE.

Drop fm3dll.str and mkstr.exe from makefiles and wpi builders

Convert many functions to expect PCSZ arguments.
Correct walk, compare and dirsizes dialog setups to ignore saved dialog size
Drop copyright.c logic from makefile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/fonts.c

    r1391 r1394  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2008 Steven H. Levine
     9  Copyright (c) 2008, 2009 Steven H. Levine
    1010
    1111  05 Jan 08 SHL Sync
     
    7676
    7777VOID SetPresParamFromFattrs(HWND hwnd, FATTRS * fattrs,
    78                             SHORT sNominalPointSize, FIXED fxPointSize)
     78                            SHORT sNominalPointSize, FIXED fxPointSize)
    7979{
    8080
     
    8787    if ((((USHORT) FIXEDFRAC(fxPointSize) * 100) / 65536) > 0)
    8888      sprintf(&s[strlen(s)], "%hd.",
    89               ((USHORT) FIXEDFRAC(fxPointSize) * 100) / 65536);
     89              ((USHORT) FIXEDFRAC(fxPointSize) * 100) / 65536);
    9090  }
    9191  strcat(s, fattrs->szFacename);
     
    125125  //DosEnterCritSec(); //GKY 11-30-08
    126126  DosRequestMutexSem(hmtxFM2Globals, SEM_INDEFINITE_WAIT);
    127   szPreview = GetPString(IDS_BLURB1TEXT);
     127  szPreview = GetPString(IDS_BLURB1TEXT + counter++);
     128  if (strcmp(szPreview, "0") == 0) {
     129    counter = 0;
     130    szPreview = GetPString(IDS_BLURB1TEXT + counter++);
     131  }
    128132  DosReleaseMutexSem(hmtxFM2Globals);
    129133  //DosExitCritSec();
     
    157161  WinReleasePS(fontdlg.hpsScreen);
    158162  SetPresParamFromFattrs(hwnd, &fontdlg.fAttrs, fontdlg.sNominalPointSize,
    159                         fontdlg.fxPointSize);
     163                        fontdlg.fxPointSize);
    160164}
    161165#endif
     
    177181  HPS hps;
    178182  FONTMETRICS fontMetrics;
    179   CHAR szFamily[CCHMAXPATH], *szPreview;
     183  CHAR szFamily[CCHMAXPATH];
     184  PCSZ pcszPreview;
    180185  static FIXED fxPointSize = 0; /* keep track of this for vector fonts */
    181186
     
    184189  //DosEnterCritSec(); //GKY 11-30-08
    185190  DosRequestMutexSem(hmtxFM2Globals, SEM_INDEFINITE_WAIT);
    186   szPreview = GetPString(IDS_BLURB1TEXT);
     191  // 12 Jan 09 SHL fixme to do multiple previews or rename to IDS_BLURBTEXT
     192  pcszPreview = GetPString(IDS_BLURB1TEXT);
    187193  DosReleaseMutexSem(hmtxFM2Globals);
    188194  //DosExitCritSec();
     
    194200  if (!(flags & 1))
    195201    WinSendMsg(hwndMLE, MLM_QUERYFONT,
    196                MPFROMP((PFATTRS) & (fontDlg.fAttrs)), NULL);
     202               MPFROMP((PFATTRS) & (fontDlg.fAttrs)), NULL);
    197203  else
    198204    memcpy(&fontDlg.fAttrs, fattrs, sizeof(FATTRS));
     
    201207
    202208  GpiCreateLogFont(hps, (PSTR8) fontDlg.fAttrs.szFacename, 1,
    203                    &(fontDlg.fAttrs));
     209                   &(fontDlg.fAttrs));
    204210  GpiSetCharSet(hps, 1);
    205211  GpiQueryFontMetrics(hps, sizeof(FONTMETRICS), &fontMetrics);
     
    215221  fontDlg.hpsPrinter = NULLHANDLE;      /* Printer presentation space */
    216222
    217   fontDlg.pszTitle = GetPString(IDS_SETVIEWERFONTTITLETEXT);
    218   fontDlg.pszPreview = szPreview;
     223  fontDlg.pszTitle = (PSZ)GetPString(IDS_SETVIEWERFONTTITLETEXT);
     224  fontDlg.pszPreview = (PSZ)pcszPreview;
    219225  fontDlg.pszPtSizeList = NULL;         /* Application provided size list  */
    220226  fontDlg.pfnDlgProc = NULL;            /* Dialog subclass procedure       */
Note: See TracChangeset for help on using the changeset viewer.