X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwoptions.c;h=f9f3ce471e3b20009ff43f3ebc4e229ca1cf4fa7;hb=d91dfdc72d9abeb6733b72c9bef81ccee55b9735;hp=461ce73eb7964f81c977bc53307def4e4cb8bb0c;hpb=5cd55bddca592918f38deff675d05b650a71412e;p=xboard.git diff --git a/winboard/woptions.c b/winboard/woptions.c index 461ce73..f9f3ce4 100644 --- a/winboard/woptions.c +++ b/winboard/woptions.c @@ -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)) { @@ -1170,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); @@ -1187,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); @@ -1248,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();