X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwoptions.c;h=a149b411f40f833cd8ac034a9273926022222c24;hb=4011e8678d85310eedf19fd00aa5d96a9a60770a;hp=a42b513fffe25ac7784a66899501f3ecaa2850b8;hpb=0c50ae2ce35e3d7811154badc483049dd33979fc;p=xboard.git diff --git a/winboard/woptions.c b/winboard/woptions.c index a42b513..a149b41 100644 --- a/winboard/woptions.c +++ b/winboard/woptions.c @@ -1,7 +1,7 @@ /* * woptions.c -- Options dialog box routines for WinBoard * - * Copyright 2000, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. + * Copyright 2000, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc. * * Enhancements Copyright 2005 Alessandro Scotti * @@ -440,7 +440,7 @@ PaintSampleSquare( /* * clean up */ - SelectObject(hdcMem, oldBrushPiece); + SelectObject(hdcMem, oldBrushSquare); SelectObject(hdcMem, oldPen); DeleteObject(brushPiece); DeleteObject(brushPieceDetail); @@ -850,7 +850,6 @@ int radioButton[] = { -1, OPT_VariantShogi, -1, // Chu - OPT_VariantXiangqi, OPT_VariantCourier, OPT_VariantGothic, OPT_VariantCapablanca, @@ -865,10 +864,11 @@ int radioButton[] = { OPT_VariantGreat, -1, // Twilight, OPT_VariantMakruk, - OPT_VariantASEAN, OPT_VariantSChess, OPT_VariantGrand, OPT_VariantSpartan, // Spartan + OPT_VariantXiangqi, + OPT_VariantASEAN, OPT_VariantLion, -2 // sentinel }; @@ -2535,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_Counts, ""); switch (appData.searchMode) { case 1: CheckDlgButton(hDlg, OPT_Exact, TRUE); @@ -2579,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); + GetDlgItemText(hDlg, OPT_Counts, 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;