X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwoptions.c;h=2c92e4d4aca46d20d7e3eccec838c255e13f6101;hb=8ee0292f69ffa3ebef03640cc5944d9c60e86bb8;hp=6f2adeb9754d14dbec42518a1dc1d0fde48214f0;hpb=e6e38912837a4fe2464356408d10dee950b3121c;p=xboard.git diff --git a/winboard/woptions.c b/winboard/woptions.c index 6f2adeb..2c92e4d 100644 --- a/winboard/woptions.c +++ b/winboard/woptions.c @@ -212,6 +212,9 @@ GeneralOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) CHECK_BOX(OPT_SmartMove, appData.oneClick); // [HGM] one-click CHECK_BOX(OPT_AutoTags, appData.autoDisplayTags); // [HGM] CHECK_BOX(OPT_AutoComment, appData.autoDisplayComment); // [HGM] + CHECK_BOX(OPT_Headers, appData.headers); // [HGM] + CHECK_BOX(OPT_Variations, appData.variations); // [HGM] + CHECK_BOX(OPT_AutoExtend, appData.autoExtend); // [HGM] #undef CHECK_BOX @@ -263,6 +266,9 @@ GeneralOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) appData.oneClick =IS_CHECKED(OPT_SmartMove); // [HGM] one-click appData.autoDisplayTags =IS_CHECKED(OPT_AutoTags); // [HGM] appData.autoDisplayComment =IS_CHECKED(OPT_AutoComment); // [HGM] + appData.headers =IS_CHECKED(OPT_Headers); // [HGM] + appData.variations =IS_CHECKED(OPT_Variations); // [HGM] + appData.autoExtend =IS_CHECKED(OPT_AutoExtend); // [HGM] #undef IS_CHECKED @@ -434,7 +440,7 @@ PaintSampleSquare( /* * clean up */ - SelectObject(hdcMem, oldBrushPiece); + SelectObject(hdcMem, oldBrushSquare); SelectObject(hdcMem, oldPen); DeleteObject(brushPiece); DeleteObject(brushPieceDetail); @@ -2529,6 +2535,7 @@ LoadOptions(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) SetDlgItemInt(hDlg, OPT_Stretch, appData.stretch, FALSE); CheckDlgButton(hDlg, OPT_Reversed, appData.ignoreColors); CheckDlgButton(hDlg, OPT_Mirror, appData.findMirror); + SetDlgItemText(hDlg, OPT_Range, ""); switch (appData.searchMode) { case 1: CheckDlgButton(hDlg, OPT_Exact, TRUE); @@ -2573,6 +2580,10 @@ LoadOptions(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) appData.searchMode = LoadOptionsWhichRadio(hDlg); appData.ignoreColors = IsDlgButtonChecked(hDlg, OPT_Reversed); appData.findMirror = IsDlgButtonChecked(hDlg, OPT_Mirror); + appData.eloThreshold1 = GetDlgItemText(hDlg, OPT_Range, buf, MSG_SIZ); + appData.minPieces = appData.maxPieces = 0; + sscanf(buf, "%d-%d", appData.minPieces, appData.maxPieces); + if(appData.maxPieces < appData.minPieces) appData.maxPieces = appData.minPieces; EndDialog(hDlg, TRUE); return TRUE; @@ -3071,6 +3082,8 @@ LRESULT CALLBACK UciOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM SetDlgItemInt( hDlg, IDC_Games, appData.defaultMatchGames, TRUE ); SendDlgItemMessage( hDlg, IDC_PolyglotDir, EM_SETSEL, 0, -1 ); + // [HGM] Yet another ponder duplicate + CheckDlgButton( hDlg, OPT_PonderNextMove, (BOOL) appData.ponderNextMove ); return TRUE; @@ -3090,10 +3103,11 @@ LRESULT CALLBACK UciOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM GetDlgItemText( hDlg, IDC_BookFile, buf, sizeof(buf) ); appData.polyglotBook = strdup(buf); appData.usePolyglotBook = (Boolean) IsDlgButtonChecked( hDlg, IDC_UseBook ); - // [HGM] smp: get nr of cores: + // [HGM] smp: get nr of cores and ponder: oldCores = appData.smpCores; appData.smpCores = GetDlgItemInt(hDlg, IDC_Cores, NULL, FALSE ); if(appData.smpCores != oldCores) NewSettingEvent(FALSE, &(first.maxCores), "cores", appData.smpCores); + PonderNextMoveEvent((Boolean) IsDlgButtonChecked( hDlg, OPT_PonderNextMove )); // [HGM] book: read tick boxes for own book use appData.firstHasOwnBookUCI = (Boolean) IsDlgButtonChecked( hDlg, IDC_OwnBook1 ); appData.secondHasOwnBookUCI = (Boolean) IsDlgButtonChecked( hDlg, IDC_OwnBook2 ); @@ -3128,6 +3142,7 @@ LRESULT CALLBACK UciOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM ofn.hwndOwner = hDlg; ofn.hInstance = hInst; ofn.lpstrFilter = filter; + ofn.lpstrFile = buf; ofn.nMaxFile = sizeof(buf); ofn.lpstrTitle = _("Choose Book");