Changeset 1395 for trunk/dll/datamin.c


Ignore:
Timestamp:
Feb 8, 2009, 2:48:16 AM (17 years ago)
Author:
Gregg Young
Message:

Allow user to turn off alert and/or error beeps in settings notebook. Ticket 341 Move repeated strings to PCSZs. Ticket 6 Add *DateFormat functions to format dates based on locale Ticket 28 Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error Ticket 6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/datamin.c

    r1391 r1395  
    2525                Dos/Win programs from being inserted into the execute dialog with message why.
    2626  11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c
     27  07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error
     28  07 Feb 09 GKY Add *DateFormat functions to format dates based on locale
    2729
    2830***********************************************************************/
     
    260262                             MINI_X,
    261263                             MINI_Y, hwnd, HWND_TOP, ids[c], NULL, NULL)) {
    262           Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__, IDS_WINCREATEWINDOW);
     264          Win_Error(hwnd, hwnd, pszSrcFile, __LINE__,
     265                    PCSZ_WINCREATEWINDOW);
    263266        }
    264267        x += (MINI_X + 4);
     
    318321                                 WS_VISIBLE, x, y, MINI_X, MINI_Y, hwnd,
    319322                                 HWND_TOP, MINI_DRIVEA + c, NULL, NULL)) {
    320               Win_Error2(hwnd, hwnd, pszSrcFile, __LINE__,
    321                          IDS_WINCREATEWINDOW);
     323              Win_Error(hwnd, hwnd, pszSrcFile, __LINE__,
     324                        PCSZ_WINCREATEWINDOW);
    322325            }
    323326            numdrives++;
     
    747750  case UM_TIMER:
    748751    {
    749       CHAR s[134];
     752      CHAR s[134], szDate[11];
    750753      DATETIME dt;
    751754
     
    754757                        HWND_TOP, 0, 0, 0, 0, SWP_ZORDER);
    755758      if (counter && (counter % 19) && (counter % 20)) {
    756         if (!DosGetDateTime(&dt)) {
     759        if (!DosGetDateTime(&dt)) {
     760          DTDateFormat(szDate, dt);
    757761          sprintf(s,
    758                   " %02hu:%02hu:%02hu  %s %04u/%02u/%02u",
    759                   dt.hours,
    760                   dt.minutes,
     762                  " %02hu%s%02hu%s%02hu  %s %s",
     763                  dt.hours, TimeSeparator,
     764                  dt.minutes, TimeSeparator,
    761765                  dt.seconds,
    762766                  GetPString(IDS_SUNDAY + dt.weekday),
    763                   dt.year, dt.month, dt.day);
     767                  szDate);
    764768          WinSetDlgItemText(hwnd, MINI_TIME, s);
    765769        }
     
    944948                  numdays, GetPString(IDS_DAYTEXT), &"s"[numdays == 1L]);
    945949        nummins = val % (60L * 24L);
    946         sprintf(s + strlen(s), " %lu:%02lu", nummins / 60, nummins % 60);
     950        sprintf(s + strlen(s), " %lu%s%02lu", nummins / 60, TimeSeparator, nummins % 60);
    947951        WinSetDlgItemText(hwnd, MINI_TIME, s);
    948952      }
Note: See TracChangeset for help on using the changeset viewer.