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

    r1358 r1395  
    1414  30 Dec 07 GKY Use TestFDates for comparing dates
    1515  25 Dec 08 GKY Add code to allow write verify to be turned off on a per drive basis
     16  07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook.
     17  07 Feb 09 GKY Add *DateFormat functions to format dates based on locale
    1618
    1719***********************************************************************/
     
    8688
    8789        FILESTATUS3L fs1, fs2;
    88         CHAR s[CCHMAXPATH * 2], *p, chkname[CCHMAXPATH], szCmmaFmtFileSize[81];
     90        CHAR s[CCHMAXPATH * 2], *p, chkname[CCHMAXPATH], szCmmaFmtFileSize[81], szDate[11];
    8991        INT sourceexists = 0, targetexists = 0,
    9092            sourcenewer = 0, sourcesmaller = 0;
     
    103105          CommaFmtULL(szCmmaFmtFileSize,
    104106                      sizeof(szCmmaFmtFileSize), fs1.cbFile, ' ');
    105           sprintf(s,
    106                   " %s%s %ss %04u/%02u/%02u %02u:%02u:%02u",
     107          FDateFormat(szDate, fs1.fdateLastWrite);
     108          sprintf(s, " %s%s %ss %s %02u%s%02u%s%02u",
    107109                  fs1.attrFile & FILE_DIRECTORY ?
    108110                    GetPString(IDS_DIRBRKTTEXT) : NullStr,
    109111                  szCmmaFmtFileSize,
    110112                  GetPString(IDS_BYTETEXT),
    111                   fs1.fdateLastWrite.year + 1980,
    112                   fs1.fdateLastWrite.month,
    113                   fs1.fdateLastWrite.day,
    114                   fs1.ftimeLastWrite.hours,
    115                   fs1.ftimeLastWrite.minutes, fs1.ftimeLastWrite.twosecs * 2);
     113                  szDate,
     114                  fs1.ftimeLastWrite.hours, TimeSeparator,
     115                  fs1.ftimeLastWrite.minutes, TimeSeparator, fs1.ftimeLastWrite.twosecs * 2);
    116116          WinSetDlgItemText(hwnd, REN_SOURCEINFO, s);
    117117          sourceexists = 1;
     
    131131          CommaFmtULL(szCmmaFmtFileSize,
    132132                      sizeof(szCmmaFmtFileSize), fs2.cbFile, ' ');
    133           sprintf(s,
    134                   " %s%s %ss %04u/%02u/%02u %02u:%02u:%02u",
     133          FDateFormat(szDate, fs2.fdateLastWrite);
     134          sprintf(s, " %s%s %ss %s %02u%s%02u%s%02u",
    135135                  fs2.attrFile & FILE_DIRECTORY ?
    136136                    GetPString(IDS_DIRBRKTTEXT) : NullStr,
    137137                  szCmmaFmtFileSize,
    138138                  GetPString(IDS_BYTETEXT),
    139                   fs2.fdateLastWrite.year + 1980,
    140                   fs2.fdateLastWrite.month,
    141                   fs2.fdateLastWrite.day,
    142                   fs2.ftimeLastWrite.hours,
    143                   fs2.ftimeLastWrite.minutes, fs2.ftimeLastWrite.twosecs * 2);
     139                  szDate,
     140                  fs2.ftimeLastWrite.hours, TimeSeparator,
     141                  fs2.ftimeLastWrite.minutes, TimeSeparator, fs2.ftimeLastWrite.twosecs * 2);
    144142          WinSetDlgItemText(hwnd, REN_TARGETINFO, s);
    145143          targetexists = 1;
     
    327325            if (SetDir(WinQueryWindow(WinQueryWindow(hwnd, QW_PARENT),
    328326                                      QW_OWNER), hwnd, path, 0)) {
    329               DosBeep(250, 100);
     327              if (!fAlertBeepOff)
     328                DosBeep(250, 100);
    330329              WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, REN_TARGET));
    331330              break;
     
    335334        }
    336335        else {
    337           DosBeep(250, 100);
     336          if (!fAlertBeepOff)
     337            DosBeep(250, 100);
    338338          WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, REN_TARGET));
    339339        }
Note: See TracChangeset for help on using the changeset viewer.