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

    r1394 r1395  
    4242  11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c
    4343  11 Jan 08 GKY Change flag on GetMLEFont to 3 from 11 to give a larger selection of mono spaced fonts
     44  07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook.
     45  07 Feb 09 GKY Add *DateFormat functions to format dates based on locale
     46  07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error
    4447
    4548***********************************************************************/
     
    10281031                      (hs > 1) ?
    10291032                      GetPString(IDS_ARETEXT) : GetPString(IDS_ISTEXT));
    1030             if (ro || hs || sysdir)
     1033            if ((ro || hs || sysdir) && !fAlertBeepOff)
    10311034              DosBeep(300, 100);
    10321035            strcat(prompt, GetPString(IDS_DELPROMPT6TEXT));
     
    11501153                x != 1 ? GetPString(IDS_ARETEXT) : GetPString(IDS_ISTEXT));
    11511154        WinSetWindowText(WinWindowFromID(hwndFrame, SEEALL_STATUS), message);
    1152         if (toupper(*path) < 'C')
     1155        if (toupper(*path) < 'C' && !fAlertBeepOff)
    11531156          DosBeep(1000, 25);
    11541157        DosSleep(16);                   // 05 Aug 07 GKY 33
     
    12101213                                  0, 0, HWND_TOP, SEEALL_OBJ, NULL, NULL);
    12111214        if (!hwndObj) {
    1212           Win_Error2(HWND_OBJECT, HWND_DESKTOP, pszSrcFile, __LINE__,
    1213                      IDS_WINCREATEWINDOW);
     1215          Win_Error(HWND_OBJECT, HWND_DESKTOP, pszSrcFile, __LINE__,
     1216                    PCSZ_WINCREATEWINDOW);
    12141217          if (!PostMsg(ad->hwndClient, WM_CLOSE, MPVOID, MPVOID))
    12151218            WinSendMsg(ad->hwndClient, WM_CLOSE, MPVOID, MPVOID);
     
    16521655                  &d2->date, &d2->time,
    16531656                  &d1->date, &d1->time);
    1654     /*(d1->date.year > d2->date.year) ? 1 :
    1655     (d1->date.year < d2->date.year) ? -1 :
    1656     (d1->date.month > d2->date.month) ? 1 :
    1657     (d1->date.month < d2->date.month) ? -1 :
    1658     (d1->date.day > d2->date.day) ? 1 :
    1659     (d1->date.day < d2->date.day) ? -1 :
    1660     (d1->time.hours > d2->time.hours) ? 1 :
    1661     (d1->time.hours < d2->time.hours) ? -1 :
    1662     (d1->time.minutes > d2->time.minutes) ? 1 :
    1663     (d1->time.minutes < d2->time.minutes) ? -1 :
    1664     (d1->time.twosecs > d2->time.twosecs) ? 1 :
    1665     (d1->time.twosecs < d2->time.twosecs) ? -1 : 0;*/
    16661657
    16671658  if (!ret)
     
    23362327  ALLDATA *ad = WinQueryWindowPtr(hwnd, QWL_USER);
    23372328  POINTL ptl;
    2338   CHAR szBuff[CCHMAXPATH + 80], szCmmaFmtFileSize[81];
     2329  CHAR szBuff[CCHMAXPATH + 80], szCmmaFmtFileSize[81], szDate[11];
    23392330  ULONG len, y;
    23402331
     
    23712362  }
    23722363  CommaFmtULL(szCmmaFmtFileSize,
    2373               sizeof(szCmmaFmtFileSize), ad->afindex[y]->cbFile, ' ');
     2364              sizeof(szCmmaFmtFileSize), ad->afindex[y]->cbFile, ' ');
     2365  FDateFormat(szDate, ad->afindex[y]->date);
    23742366  len = sprintf(szBuff,
    2375                 "%c%-*.*s  %-12s  %c%c%c%c%c  %04u/%02u/%02u %02u:%02u:%02u ",
     2367                "%c%-*.*s  %-12s  %c%c%c%c%c  %s %02u%s%02u%s%02u ",
    23762368                whichfile == ad->cursored - 1 ? '>' : ' ',
    23772369                ad->fullnames ? ad->longestw : ad->longest,
     
    23852377                "-S"[((ad->afindex[y]->attrFile & FILE_SYSTEM) != 0)],
    23862378                "-D"[((ad->afindex[y]->attrFile & FILE_DIRECTORY) != 0)],
    2387                 ad->afindex[y]->date.year + 1980,
    2388                 ad->afindex[y]->date.month,
    2389                 ad->afindex[y]->date.day,
    2390                 ad->afindex[y]->time.hours,
    2391                 ad->afindex[y]->time.minutes,
     2379                szDate,
     2380                ad->afindex[y]->time.hours, TimeSeparator,
     2381                ad->afindex[y]->time.minutes, TimeSeparator,
    23922382                ad->afindex[y]->time.twosecs * 2);
    23932383  GpiCharStringAt(hps, &ptl, len, szBuff);
     
    26532643                                            SEEALL_STATUS, NULL, NULL);
    26542644          if (!pAD->hwndStatus)
    2655             Win_Error2(hwndFrame, hwnd, pszSrcFile, __LINE__,
    2656                        IDS_WINCREATEWINDOW);
     2645            Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__,
     2646                      PCSZ_WINCREATEWINDOW);
    26572647          else {
    26582648            PFNWP oldproc;
     
    34403430      pAD->multiplier = 1;
    34413431      if (!pAD->afindexcnt) {
    3442         DosBeep(250, 50);
     3432        if (!fAlertBeepOff)
     3433          DosBeep(250, 50);
    34433434        PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID);
    34443435      }
    34453436      else {
    3446         DosBeep(1000, 25);
     3437        if (!fAlertBeepOff)
     3438          DosBeep(1000, 25);
    34473439        WinInvalidateRect(hwnd, NULL, FALSE);
    34483440        PostMsg(hwnd, UM_SETUP3, MPVOID, MPVOID);
     
    34673459      register ULONG x;
    34683460      ULONG y, len, numlines;
    3469       CHAR szBuff[CCHMAXPATH + 80], szCmmaFmtFileSize[81];
     3461      CHAR szBuff[CCHMAXPATH + 80], szCmmaFmtFileSize[81], szDate[11];
    34703462      BOOL inverted, hidsys, reado, wascursored;
    34713463
     
    35553547                                             [COLORS_CURSOREDNORMALBACK]]);
    35563548            CommaFmtULL(szCmmaFmtFileSize,
    3557                         sizeof(szCmmaFmtFileSize), pAD->afindex[y]->cbFile, ' ');
     3549                        sizeof(szCmmaFmtFileSize), pAD->afindex[y]->cbFile, ' ');
     3550            FDateFormat(szDate, pAD->afindex[y]->date);
    35583551            len =
    35593552              sprintf(szBuff,
    3560                       "%c%-*.*s  %-12s  %c%c%c%c%c  %04u/%02u/%02u %02u:%02u:%02u ",
     3553                      "%c%-*.*s  %-12s  %c%c%c%c%c  %s %02u%s%02u%s%02u ",
    35613554                      wascursored ? '>' : ' ',
    35623555                      pAD->fullnames ? pAD->longestw : pAD->longest,
     
    35703563                      "-H"[((pAD->afindex[y]->attrFile & FILE_HIDDEN) != 0)],
    35713564                      "-S"[((pAD->afindex[y]->attrFile & FILE_SYSTEM) != 0)],
    3572                       "-D"[((pAD->afindex[y]->attrFile & FILE_DIRECTORY) !=
    3573                             0)], pAD->afindex[y]->date.year + 1980,
    3574                       pAD->afindex[y]->date.month, pAD->afindex[y]->date.day,
    3575                       pAD->afindex[y]->time.hours,
    3576                       pAD->afindex[y]->time.minutes,
     3565                      "-D"[((pAD->afindex[y]->attrFile & FILE_DIRECTORY) != 0)],
     3566                      szDate,
     3567                      pAD->afindex[y]->time.hours, TimeSeparator,
     3568                      pAD->afindex[y]->time.minutes, TimeSeparator,
    35773569                      pAD->afindex[y]->time.twosecs * 2);
    35783570            GpiCharStringAt(hpsp, &ptl, len, szBuff);
Note: See TracChangeset for help on using the changeset viewer.