Changeset 1395 for trunk/dll/info.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/info.c

    r1391 r1395  
    2929                to prevent duplicate directory names in tree following a copy before initial scan.
    3030  11 Jan 08 GKY Add Write verify off and recures scan to drive info display when appropriate.
     31  07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook.
     32  07 Feb 09 GKY Add *DateFormat functions to format dates based on locale
    3133
    3234***********************************************************************/
     
    657659      CHAR s[97];
    658660      CHAR szCmmaFmtFileSize[81], szCmmaFmtEASize[81];
    659       CHAR szCmmaFmtFileEASize[81], szCmmaFmtFileEASizeK[81];
     661      CHAR szCmmaFmtFileEASize[81], szCmmaFmtFileEASizeK[81], szDate[11];
    660662      FILEFINDBUF4L fs;
    661663      HDIR hdir = HDIR_CREATE;
     
    675677        SHORT sSelect, numitems;
    676678
    677         DosBeep(250, 100);              // Wake up user
     679        if (!fAlertBeepOff)
     680          DosBeep(250, 100);            // Wake up user
    678681        sSelect = (SHORT) WinSendDlgItemMsg(hwnd,
    679682                                            FLE_NAME,
     
    696699      }
    697700      else {
    698         DosFindClose(hdir);
    699         sprintf(s,
    700                 "%04u/%02u/%02u  %02u:%02u:%02u",
    701                 1980 + fs.fdateLastWrite.year,
    702                 fs.fdateLastWrite.month,
    703                 fs.fdateLastWrite.day,
    704                 fs.ftimeLastWrite.hours,
    705                 fs.ftimeLastWrite.minutes, fs.ftimeLastWrite.twosecs * 2);
     701        DosFindClose(hdir);
     702        FDateFormat(szDate, fs.fdateLastWrite);
     703        sprintf(s, "%s  %02u%s%02u%s%02u",
     704                szDate,
     705                fs.ftimeLastWrite.hours, TimeSeparator,
     706                fs.ftimeLastWrite.minutes, TimeSeparator, fs.ftimeLastWrite.twosecs * 2);
    706707        WinSetDlgItemText(hwnd, FLE_LASTWRITE, s);
    707708        if (fs.fdateCreation.year &&
    708             fs.fdateCreation.month && fs.fdateCreation.day) {
    709           sprintf(s,
    710                   "%04u/%02u/%02u  %02u:%02u:%02u",
    711                   1980 + fs.fdateCreation.year,
    712                   fs.fdateCreation.month,
    713                   fs.fdateCreation.day,
    714                   fs.ftimeCreation.hours,
    715                   fs.ftimeCreation.minutes, fs.ftimeCreation.twosecs * 2);
     709            fs.fdateCreation.month && fs.fdateCreation.day) {
     710          FDateFormat(szDate, fs.fdateCreation);
     711          sprintf(s, "%s  %02u%s%02u%s%02u",
     712                  szDate,
     713                  fs.ftimeCreation.hours, TimeSeparator,
     714                  fs.ftimeCreation.minutes, TimeSeparator, fs.ftimeCreation.twosecs * 2);
    716715          WinSetDlgItemText(hwnd, FLE_CREATE, s);
    717716        }
    718717        if (fs.fdateLastAccess.year &&
    719             fs.fdateLastAccess.month && fs.fdateLastAccess.day) {
    720           sprintf(s,
    721                   "%04u/%02u/%02u  %02u:%02u:%02u",
    722                   1980 + fs.fdateLastAccess.year,
    723                   fs.fdateLastAccess.month,
    724                   fs.fdateLastAccess.day,
    725                   fs.ftimeLastAccess.hours,
    726                   fs.ftimeLastAccess.minutes, fs.ftimeLastAccess.twosecs * 2);
     718            fs.fdateLastAccess.month && fs.fdateLastAccess.day) {
     719          FDateFormat(szDate, fs.fdateLastAccess);
     720          sprintf(s, "%s  %02u%s%02u%s%02u",
     721                  szDate,
     722                  fs.ftimeLastAccess.hours, TimeSeparator,
     723                  fs.ftimeLastAccess.minutes, TimeSeparator, fs.ftimeLastAccess.twosecs * 2);
    727724          WinSetDlgItemText(hwnd, FLE_LASTACCESS, s);
    728725        }
Note: See TracChangeset for help on using the changeset viewer.