X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwoptions.c;h=f9f3ce471e3b20009ff43f3ebc4e229ca1cf4fa7;hb=2efc0144a02840f0454378b19b4dbaf428c226bd;hp=09739e571ebf48bb79c4197a39d3165235deabc6;hpb=77e7ee21223612cf0440dca04dca9ae9c530af85;p=xboard.git diff --git a/winboard/woptions.c b/winboard/woptions.c old mode 100755 new mode 100644 index 09739e5..f9f3ce4 --- a/winboard/woptions.c +++ b/winboard/woptions.c @@ -1,7 +1,7 @@ /* * woptions.c -- Options dialog box routines for WinBoard * - * Copyright 2000,2009 Free Software Foundation, Inc. + * Copyright 2000, 2009, 2010 Free Software Foundation, Inc. * * Enhancements Copyright 2005 Alessandro Scotti * @@ -146,12 +146,14 @@ GeneralOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) static Boolean oldShowCoords; static Boolean oldBlindfold; static Boolean oldShowButtonBar; + static Boolean oldAutoLogo; switch (message) { case WM_INITDIALOG: /* message: initialize dialog box */ oldShowCoords = appData.showCoords; oldBlindfold = appData.blindfold; oldShowButtonBar = appData.showButtonBar; + oldAutoLogo = appData.autoLogo; /* Center the dialog over the application window */ CenterWindow (hDlg, GetWindow (hDlg, GW_OWNER)); @@ -181,6 +183,7 @@ GeneralOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) CHECK_BOX(OPT_SaveExtPGN, appData.saveExtendedInfoInPGN); CHECK_BOX(OPT_ExtraInfoInMoveHistory, appData.showEvalInMoveHistory); CHECK_BOX(OPT_HighlightMoveArrow, appData.highlightMoveWithArrow); + CHECK_BOX(OPT_AutoLogo, appData.autoLogo); // [HGM] logo #undef CHECK_BOX @@ -228,6 +231,7 @@ GeneralOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) ShowThinkingEvent(); // [HGM] thinking: tests four options appData.testLegality = IS_CHECKED(OPT_TestLegality); appData.highlightMoveWithArrow=IS_CHECKED(OPT_HighlightMoveArrow); + appData.autoLogo =IS_CHECKED(OPT_AutoLogo); // [HGM] logo #undef IS_CHECKED @@ -249,7 +253,10 @@ GeneralOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) */ EndDialog(hDlg, TRUE); - if (oldShowButtonBar != appData.showButtonBar) { + if (oldAutoLogo != appData.autoLogo) { // [HGM] logo: remove any logos when we switch autologo off + if(oldAutoLogo) first.programLogo = second.programLogo = NULL; + InitDrawingSizes(boardSize, 0); + } else if (oldShowButtonBar != appData.showButtonBar) { InitDrawingSizes(boardSize, 0); } else if ((oldShowCoords != appData.showCoords) || (oldBlindfold != appData.blindfold)) { @@ -774,7 +781,8 @@ VariantWhichRadio(HWND hDlg) (IsDlgButtonChecked(hDlg, OPT_VariantGreat) ? VariantGreat : (IsDlgButtonChecked(hDlg, OPT_VariantGiveaway) ? VariantGiveaway : (IsDlgButtonChecked(hDlg, OPT_VariantTwilight) ? VariantTwilight : - VariantNormal )))))))))))))))))))))))))))); + (IsDlgButtonChecked(hDlg, OPT_VariantMakruk) ? VariantMakruk : + VariantNormal ))))))))))))))))))))))))))))); } LRESULT CALLBACK @@ -873,6 +881,9 @@ NewVariantDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) case VariantTwilight: CheckDlgButton(hDlg, OPT_VariantTwilight, TRUE); break; + case VariantMakruk: + CheckDlgButton(hDlg, OPT_VariantMakruk, TRUE); + break; default: ; } @@ -1166,11 +1177,17 @@ IcsOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) /* Initialize the dialog items */ #define CHECK_BOX(x,y) CheckDlgButton(hDlg, (x), (BOOL)(y)) + CHECK_BOX(OPT_AutoKibitz, appData.autoKibitz); CHECK_BOX(OPT_AutoComment, appData.autoComment); CHECK_BOX(OPT_AutoObserve, appData.autoObserve); CHECK_BOX(OPT_GetMoveList, appData.getMoveList); CHECK_BOX(OPT_LocalLineEditing, appData.localLineEditing); CHECK_BOX(OPT_QuietPlay, appData.quietPlay); + CHECK_BOX(OPT_SeekGraph, appData.seekGraph); + CHECK_BOX(OPT_AutoRefresh, appData.autoRefresh); + CHECK_BOX(OPT_BgObserve, appData.bgObserve); + CHECK_BOX(OPT_DualBoard, appData.dualBoard); + CHECK_BOX(OPT_SmartMove, appData.oneClick); CHECK_BOX(OPT_Premove, appData.premove); CHECK_BOX(OPT_PremoveWhite, appData.premoveWhite); CHECK_BOX(OPT_PremoveBlack, appData.premoveBlack); @@ -1183,6 +1200,7 @@ IcsOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) SetDlgItemText(hDlg, OPT_IcsAlarmTime, buf); SetDlgItemText(hDlg, OPT_PremoveWhiteText, appData.premoveWhiteText); SetDlgItemText(hDlg, OPT_PremoveBlackText, appData.premoveBlackText); + SetDlgItemText(hDlg, OPT_StartupChatBoxes, appData.chatBoxes); SendDlgItemMessage(hDlg, OPT_SampleShout, EM_SETBKGNDCOLOR, 0, cbc); SendDlgItemMessage(hDlg, OPT_SampleSShout, EM_SETBKGNDCOLOR, 0, cbc); @@ -1244,17 +1262,25 @@ IcsOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) appData.premove = IS_CHECKED(OPT_Premove); appData.premoveWhite = IS_CHECKED(OPT_PremoveWhite); appData.premoveBlack = IS_CHECKED(OPT_PremoveBlack); + appData.autoKibitz = IS_CHECKED(OPT_AutoKibitz); appData.autoComment = IS_CHECKED(OPT_AutoComment); appData.autoObserve = IS_CHECKED(OPT_AutoObserve); appData.getMoveList = IS_CHECKED(OPT_GetMoveList); appData.localLineEditing = IS_CHECKED(OPT_LocalLineEditing); appData.quietPlay = IS_CHECKED(OPT_QuietPlay); + appData.seekGraph = IS_CHECKED(OPT_SeekGraph); + appData.autoRefresh = IS_CHECKED(OPT_AutoRefresh); + appData.bgObserve = IS_CHECKED(OPT_BgObserve); + appData.dualBoard = IS_CHECKED(OPT_DualBoard); + appData.oneClick = IS_CHECKED(OPT_SmartMove); #undef IS_CHECKED appData.icsAlarmTime = number * 1000; GetDlgItemText(hDlg, OPT_PremoveWhiteText, appData.premoveWhiteText, 5); GetDlgItemText(hDlg, OPT_PremoveBlackText, appData.premoveBlackText, 5); + GetDlgItemText(hDlg, OPT_StartupChatBoxes, buf, sizeof(buf)); + buf[sizeof(buf)-1] = NULLCHAR; appData.chatBoxes = StrSave(buf); // memory leak if (appData.localLineEditing) { DontEcho();