Changeset 89


Ignore:
Timestamp:
Aug 24, 2020, 11:57:26 PM (5 years ago)
Author:
Gregg Young
Message:

Remove snapshot window stuff from Gotcha Quiet. Add strings and adjust code so the error caused by trying to open GQ twice can be translated

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/NLS/en/goqresen.rc

    r87 r89  
    3737/*     "English",              /* Language to be used for online help */
    3838/*     "Gotcha_en",              /* Name of the help file */
    39 }
    40 
    41 MENU IDM_SSWPOPUP
    42 {
    43     SUBMENU  "~Capture",                 WID_CAPTURETYPE,MS_CONDITIONALCASCADE
    44     {
    45         MENUITEM "~Screen",              WID_SSWSCREEN
    46         MENUITEM "Screen ~region",       WID_SSWSCREENREGION
    47         MENUITEM "~Window",              WID_SSWWINDOW
    48         MENUITEM "Window  ~interior",    WID_SSWWINDOWINT
    49     }
    50     MENUITEM "Hide when capturing",      WID_CB_SSWHIDE
    51     MENUITEM "Always on top",            WID_CB_SSWALWAYSONTOP
    52     MENUITEM SEPARATOR
    53     MENUITEM "Close",                    WID_CB_SSWENABLE
    5439}
    5540
     
    289274    IDS_MAINWIN                        "Gotcha!"
    290275    IDS_PAGESAVE                       "Saving"
    291     IDS_PAGESNAPSHOT                   "Snapshot"
    292276    IDS_CAPTURE                        "Capture"
    293277    IDS_PAGELANGUAGE                   "Language"
     
    304288    IDS_BMF_DIB        "Device Independent Bitmap (dib)"
    305289
    306     IDS_SNAPLABEL                      "Snap!"
    307290    IDS_GENERALHELP                    "Gotcha! ~help\tF1"
    308291
     
    310293    IDS_CANCEL                "~Cancel"
    311294    IDS_WISHCONTINUE          "Do you wish to continue?"
     295   
     296    IDS_ERROR_ALREADYRUNNING    "GOTCHA QUIET Already running"
     297    IDS_ERROR_ALREADYRUNNINGMSG "Another instance of Gotcha Quiet is running. Open Gotcha Quiet's settings by pressing Alt+PrintScreen"
    312298}
  • trunk/gotcha.cpp

    r65 r89  
    114114    HMQ hmq = WinCreateMsgQueue (hab, 0);
    115115
     116    // Load settings move up here so the string table is available for the already running error
     117    pset = new SETTINGS;
    116118    //DisplayError("DEBUG", "%d", Version());
    117119#ifdef _QUIET_
     
    127129    int rc;
    128130    HMTX    hmtx     = NULLHANDLE;
    129     // running multiple instances orphans all but the first closed hook unloaded
     131    // running multiple instances orphans all but the first hook unloaded
    130132    rc = DosOpenMutexSem("\\SEM32\\GOTCHA", &hmtx);
    131133    if (!rc) {
    132         DisplayError("GOTCHA QUIET Already running",
    133                      "Another instance of Gotcha Quiet is running. You can "
    134                      "open Gotcha Quiet's settings using the Alt+PrintScreen "
    135                      "key combination");
     134        DisplayError(RSTR (IDS_ERROR_ALREADYRUNNING),
     135                     RSTR (IDS_ERROR_ALREADYRUNNINGMSG));
    136136        exit (0);
    137137    }
     
    147147    WinRegisterClass (hab, "thth.wc.gotcha.main", WindowProcedure, 0L,
    148148                      sizeof (ULONG)*2L);
     149#ifndef _QUIET_
    149150    WinRegisterClass (hab, "thth.wc.gotcha.snapshot", wpSnapshot,
    150151                      CS_SIZEREDRAW, sizeof (ULONG)*2L);
    151 
     152#endif
    152153    // load the settings
    153     pset = new SETTINGS;
     154    //pset = new SETTINGS;
    154155
    155156    pset->idleSetInIni = pset->QueryFlag(SEI_IDLEPRIORITY);
     
    175176    // create the windows
    176177    hwndFrame = CreateMainWindow ();
     178#ifndef _QUIET_
    177179    hwndSnapshot = CreateSnapshotWindow ();
    178 
     180#endif
    179181    SWP swp;
    180182    USHORT us[7];
     
    196198    StartInputHook ();
    197199#endif
    198 
     200#ifndef _QUIET_
    199201    // position snapshot window
    200202    pset->QueryWindowData (&swp, us);
     
    207209    else
    208210        WinShowWindow (hwndSnapshot, TRUE);
    209 
     211#endif
    210212    WinSetWindowPos (hwndFrame, NULLHANDLE, 0,0, 0,0, SWP_SHOW);
    211213    WinSetWindowPos (WinWindowFromID (hwndFrame, FID_CLIENT), NULLHANDLE,
     
    231233        pset->SetNumSaveDir (pset->pNumSaveDir);
    232234    }
     235#ifndef _QUIET_
    233236    // save size, etc. of snapshot window
    234237    WinQueryWindowPos (hwndSnapshot, &swp);
    235238    pset->SetWindowData (&swp);
    236 
     239#endif
    237240    // save size, etc. of main window
    238241    WinQueryWindowPos (hwndFrame, &swp);
     
    240243
    241244    // goodbye windows!
     245#ifndef _QUIET_
    242246    WinDestroyWindow (hwndSnapshot);
     247#endif
    243248    WinDestroyWindow (hwndFrame);
    244249
  • trunk/id.h

    r55 r89  
    167167#define IDS_CANCEL                          38
    168168#define IDS_WISHCONTINUE                    39
     169#define IDS_ERROR_ALREADYRUNNING            40
     170#define IDS_ERROR_ALREADYRUNNINGMSG         41
    169171
    170172#define MAIN_HELP_TABLE                     1
  • trunk/settings.cpp

    r55 r89  
    651651        LogDebug( "Page2Procedure: start UM_SETTINGS2DIALOG" );
    652652#endif
     653#ifndef _QUIET_
    653654        // set state of checkbuttons
    654655        pset->AdjustButton (hwnd, WID_CB_SSWENABLE,
     
    658659        pset->AdjustButton (hwnd, WID_CB_SSWALWAYSONTOP,
    659660                            pset->SSWAlwaysOnTop ());
    660 #ifdef _QUIET_
     661#else
    661662//#if 1
    662663        pset->AdjustButton (hwnd, WID_CB_SERIALCAPTURE,
     
    698699            break;
    699700        }
    700 
     701#ifndef _QUIET_
    701702        // show or hide snapshot window
    702703        if (! WinSendDlgItemMsg (hwnd, WID_CB_SSWENABLE,
     
    705706        else
    706707            WinShowWindow (hwndSnapshot, TRUE);
    707 
     708#endif
    708709#ifdef _DOLOGDEBUG_
    709710        LogDebug( "Page1Procedure: end UM_SETTINGS2DIALOG" );
     
    785786        switch (SHORT1FROMMP (mp1))
    786787        {
     788#ifndef _QUIET_
    787789        case WID_CB_SSWENABLE:
    788790            if (! WinSendDlgItemMsg (hwnd, WID_CB_SSWENABLE,
     
    792794                WinShowWindow (hwndSnapshot, TRUE);
    793795            break;
     796#endif
    794797        case WID_CB_DELAYEDCAPTURE:
    795798
  • trunk/snapshot.cpp

    r2 r89  
    1919
    2020// ** CreateSnapshotWindow ************************************************ /*FOLD00*/
    21 
     21#ifndef _QUIET_
    2222HWND CreateSnapshotWindow (VOID)
    2323{
     
    206206    return WinDefWindowProc (hwnd, msg, mp1, mp2);
    207207}
    208 
     208#endif
    209209// ************************************************************************
Note: See TracChangeset for help on using the changeset viewer.