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

    r1394 r1395  
    5959  01 Jan 09 GKY Add Seek and Scan to drives & directory context menus pass drive/dir as search root
    6060  11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c
     61  07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook.
     62  07 Feb 09 GKY Add *DateFormat functions to format dates based on locale
     63  07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error
    6164
    6265***********************************************************************/
     
    12201223          WinSetWindowText(WinWindowFromID(dcd->hwndFrame,
    12211224                                           MAIN_STATUS), pci->pszFileName);
    1222         if (fMoreButtons && hwndName) {
     1225        if (fMoreButtons && hwndName) {
     1226          CHAR szDate[11];
     1227
     1228          DateFormat(szDate, pci->date);
    12231229          WinSetWindowText(hwndName, pci->pszFileName);
    1224           sprintf(str,
    1225                   "%04u/%02u/%02u %02u:%02u:%02u",
    1226                   pci->date.year,
    1227                   pci->date.month,
    1228                   pci->date.day,
    1229                   pci->time.hours, pci->time.minutes, pci->time.seconds);
     1230          sprintf(str, "%s %02u%s%02u%s%02u", szDate,
     1231                  pci->time.hours, TimeSeparator,
     1232                  pci->time.minutes, TimeSeparator, pci->time.seconds);
    12301233          WinSetWindowText(hwndDate, str);
    12311234          WinSetWindowText(hwndAttr, pci->pszDispAttr);
     
    18371840                UnFlesh(hwnd, pci);
    18381841                PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID);
    1839                 DosBeep(250, 100);
     1842                if (!fAlertBeepOff)
     1843                  DosBeep(250, 100);
    18401844              }
    18411845            }
     
    19051909          !(pci->flags & RECFLAGS_ENV) && IsFullName(pci->pszFileName)) {
    19061910        if (driveflags[toupper(*pci->pszFileName) - 'A'] & DRIVE_INVALID) {
    1907           DosBeep(50, 100);
     1911          if (!fAlertBeepOff)
     1912            DosBeep(50, 100);
    19081913          if (hwndStatus)
    19091914            WinSetWindowText(hwndStatus, GetPString(IDS_RESCANSUGTEXT));
     
    32083213                                              SV_CYMINMAXBUTTON), hwndFrame,
    32093214                                              HWND_TOP, IDM_OPENWINDOW, NULL, NULL)) {
    3210           Win_Error2(hwndFrame, hwndParent, pszSrcFile, __LINE__,
    3211                      IDS_WINCREATEWINDOW);
     3215          Win_Error(hwndFrame, hwndParent, pszSrcFile, __LINE__,
     3216                    PCSZ_WINCREATEWINDOW);
    32123217        }
    32133218      }
     
    32253230                                             * 2), 22, hwndFrame, HWND_TOP,
    32263231                             MAIN_STATUS, NULL, NULL)) {
    3227           Win_Error2(hwndFrame, hwndParent, pszSrcFile, __LINE__,
    3228                      IDS_WINCREATEWINDOW);
     3232          Win_Error(hwndFrame, hwndParent, pszSrcFile, __LINE__,
     3233                    PCSZ_WINCREATEWINDOW);
    32293234        }
    32303235      }
     
    32583263                                     HWND_TOP, (ULONG) TREE_CNR, NULL, NULL);
    32593264      if (!dcd->hwndCnr) {
    3260         Win_Error2(hwndClient, hwndClient, pszSrcFile, __LINE__,
    3261                    IDS_WINCREATEWINDOW);
     3265        Win_Error(hwndClient, hwndClient, pszSrcFile, __LINE__,
     3266                  PCSZ_WINCREATEWINDOW);
    32623267        PostMsg(hwndClient, WM_CLOSE, MPVOID, MPVOID);
    32633268        free(dcd);
Note: See TracChangeset for help on using the changeset viewer.