Changeset 51 for trunk/settings.cpp


Ignore:
Timestamp:
Apr 7, 2018, 10:04:50 PM (7 years ago)
Author:
Gregg Young
Message:

Save setting only if OK is selected; Prevent hang where a selected "window" has focus a steals the mouse/keyboard input from Gotcha Quiet; Change the Gotcha Quiet main window from a WINDOW to a DIALOG; Turn off the beep on abort for cases where the user aborted the capture (still beeps if something failed) Dialog proc changes for Gotcha Quiet dialog reorganization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/settings.cpp

    r41 r51  
    219219        }
    220220#ifndef _QUIET_
    221 //#if 0
    222221        // open and assign dialogs to pages
    223222        hwndPage[0] = WinLoadDlg (hwndNB, hwndNB, (PFNWP) Page1Procedure,
     
    263262    WinSendDlgItemMsg (g_hwndPage0, WID_RB_FILE, BM_CLICK,
    264263                       MPFROMSHORT (TRUE), 0);
    265     WinSendDlgItemMsg (g_hwndPage0, WID_CB_HIDEWINDOW, BM_SETCHECK,
    266                        MPFROMLONG (TRUE), MPFROMLONG (0));
     264    //WinSendDlgItemMsg (g_hwndPage0, WID_CB_HIDEWINDOW, BM_SETCHECK,
     265    //                   MPFROMLONG (TRUE), MPFROMLONG (0));
    267266    //WinSetFocus (WinWindowFromID (hwndDlg, WID_PB_OK), TRUE);
    268     //WinSetFocus( hwndPage[0], TRUE );
     267    //WinSetFocus( hwndPage[0], FALSE );
    269268#ifdef _QUIET_
    270269    if (HACCEL haccel = WinLoadAccelTable (hab, GETMODULE, 1)) {
    271270        int rc = WinSetAccelTable (hab, haccel, hwndDlg);
    272         _PmpfF(( " Acceltable %i", rc));
    273     }
    274 #endif
    275     WinSetActiveWindow( HWND_DESKTOP, hwndPage[0] );
     271    }
     272#endif
     273    WinSetActiveWindow( HWND_DESKTOP, hwndDlg );
    276274#ifdef _DOLOGDEBUG_
    277275    LogDebug( "Dialog: checkpoint 7" );
     
    355353            break;
    356354
     355        case WID_PB_ABOUT:
     356            AboutBox (hwnd);
     357            break;
     358
    357359        case DID_CANCEL:
    358360            {
     
    636638
    637639    case WM_COMMAND:
     640
     641        if( SHORT1FROMMP( mp1 ) == WID_PB_OK) {
     642            saveum = TRUE;
     643            WinSendMsg ( g_hwndSettingsDialog, WM_CLOSE, 0,0);
     644        }
    638645        if( SHORT1FROMMP( mp1 ) == DID_CANCEL )
    639646            WinPostMsg( g_hwndSettingsDialog, msg, mp1, mp2 );
     
    657664        pset->AdjustButton (hwnd, WID_CB_DELAYCOUNTDOWN,
    658665                            pset->DelayCountdown ());
     666        pset->AdjustButton (hwnd, WID_CB_DELAYEDCAPTURE,
     667                            pset->DelayedCapture ());
    659668
    660669        // init delay time sb
     
    728737            pset->DelayCountdown(WinQueryButtonCheckstate
    729738                                 (hwnd, WID_CB_DELAYCOUNTDOWN));
     739            pset->DelayedCapture (WinQueryButtonCheckstate
     740                                  (hwnd,WID_CB_DELAYEDCAPTURE));
    730741#endif
    731742        // get ssw capture type
     
    781792                WinShowWindow (hwndSnapshot, TRUE);
    782793            break;
     794        case WID_CB_DELAYEDCAPTURE:
     795
     796            WinSendDlgItemMsg (g_hwndPage0, WID_CB_DELAYEDCAPTURE, BM_SETCHECK,
     797                               MPFROMLONG (WinQueryButtonCheckstate
     798                                           (hwnd,WID_CB_DELAYEDCAPTURE)),
     799                               MPFROMLONG (0));
     800            WinSendDlgItemMsg (WinWindowFromID(hwndFrame, FID_CLIENT),
     801                               WID_CB_DELAYEDCAPTURE, BM_SETCHECK,
     802                               MPFROMLONG (WinQueryButtonCheckstate
     803                                           (hwnd,WID_CB_DELAYEDCAPTURE)),
     804                               MPFROMLONG (0));
     805            break;
    783806        }
    784807        return MRESULT (FALSE);
Note: See TracChangeset for help on using the changeset viewer.