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

    r1394 r1395  
    3434  10 Dec 08 SHL Integrate exception handler support
    3535  11 Jan 09 GKY Replace font names in the string file with global set at compile in init.c
     36  07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook.
     37  07 Feb 09 GKY Eliminate Win_Error2 by moving function names to PCSZs used in Win_Error
    3638
    3739***********************************************************************/
     
    10951097            DosReleaseMutexSem(ad->ScanSem);
    10961098            if (!ad->stopflag && firstline == ULONG_MAX) {
    1097               DosBeep(50, 50);
     1099              if (!fAlertBeepOff)
     1100                DosBeep(50, 50);
    10981101              WinSetWindowText(WinWindowFromID(ad->hwndFrame,
    10991102                                               NEWVIEW_STATUS1),
     
    12051208              DosReleaseMutexSem(ad->ScanSem);
    12061209              released = TRUE;
    1207               DosBeep(50, 100);
     1210              if (!fAlertBeepOff)
     1211                DosBeep(50, 100);
    12081212              WinSetWindowText(WinWindowFromID(ad->hwndFrame,
    12091213                                               NEWVIEW_STATUS1),
     
    17491753        s[SEARCHSTRINGLEN - 1] = 0;
    17501754        if (!*s) {
    1751           DosBeep(250, 100);            // Complain
     1755          if (!fAlertBeepOff)
     1756            DosBeep(250, 100);          // Complain
    17521757          break;
    17531758        }
     
    18111816                                 HWND_TOP, IDM_PREVBLANKLINE, NULL, NULL);
    18121817      if (!temphwnd)
    1813         Win_Error2(hwndFrame, hwnd, pszSrcFile, __LINE__,
    1814                    IDS_WINCREATEWINDOW);
     1818        Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__,
     1819                  PCSZ_WINCREATEWINDOW);
    18151820      else {
    18161821        //fixme to allow user to change presparams 1-10-09 GKY
     
    18321837                                 HWND_TOP, IDM_NEXTBLANKLINE, NULL, NULL);
    18331838      if (!temphwnd)
    1834         Win_Error2(hwndFrame, hwnd, pszSrcFile, __LINE__,
    1835                    IDS_WINCREATEWINDOW);
     1839        Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__,
     1840                  PCSZ_WINCREATEWINDOW);
    18361841      else {
    18371842        //fixme to allow user to change presparams 1-10-09 GKY
     
    18961901                                          NEWVIEW_STATUS1, NULL, NULL);
    18971902        if (!ad->hwndStatus1)
    1898           Win_Error2(hwndFrame, hwnd, pszSrcFile, __LINE__,
    1899                      IDS_WINCREATEWINDOW);
     1903          Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__,
     1904                    PCSZ_WINCREATEWINDOW);
    19001905
    19011906        ad->hwndStatus2 = WinCreateWindow(hwndFrame,
     
    19121917                                          NEWVIEW_STATUS2, NULL, NULL);
    19131918        if (!ad->hwndStatus2)
    1914           Win_Error2(hwndFrame, hwnd, pszSrcFile, __LINE__,
    1915                      IDS_WINCREATEWINDOW);
     1919          Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__,
     1920                    PCSZ_WINCREATEWINDOW);
    19161921
    19171922        ad->hwndStatus3 = WinCreateWindow(hwndFrame,
     
    19281933                                          NEWVIEW_STATUS3, NULL, NULL);
    19291934        if (!ad->hwndStatus3)
    1930           Win_Error2(hwndFrame, hwnd, pszSrcFile, __LINE__,
    1931                      IDS_WINCREATEWINDOW);
     1935          Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__,
     1936                    PCSZ_WINCREATEWINDOW);
    19321937
    19331938        ad->hwndListbox = WinCreateWindow(hwndFrame,
     
    19431948                                          NEWVIEW_LISTBOX, NULL, NULL);
    19441949        if (!ad->hwndListbox)
    1945           Win_Error2(hwndFrame, hwnd, pszSrcFile, __LINE__,
    1946                      IDS_WINCREATEWINDOW);
     1950          Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__,
     1951                    PCSZ_WINCREATEWINDOW);
    19471952
    19481953        ad->hwndDrag = WinCreateWindow(hwndFrame,
     
    19571962                                       HWND_TOP, NEWVIEW_DRAG, NULL, NULL);
    19581963        if (!ad->hwndDrag)
    1959           Win_Error2(hwndFrame, hwnd, pszSrcFile, __LINE__,
    1960                      IDS_WINCREATEWINDOW);
     1964          Win_Error(hwndFrame, hwnd, pszSrcFile, __LINE__,
     1965                    PCSZ_WINCREATEWINDOW);
    19611966
    19621967        oldproc = WinSubclassWindow(hwndFrame, ViewFrameWndProc);
     
    36213626            }
    36223627            WinSetPointer(HWND_DESKTOP, hptrArrow);
    3623             if (x >= ad->numlines)
     3628            if (x >= ad->numlines && !fAlertBeepOff)
    36243629              DosBeep(50, 100);
    36253630          }
     
    36923697              break;
    36933698            if (ad->numlines <= numlines) {
    3694               DosBeep(500, 100);
     3699              if (!fAlertBeepOff)
     3700                DosBeep(500, 100);
    36953701              break;
    36963702            }
Note: See TracChangeset for help on using the changeset viewer.