From 31a03160a3ed3b95ce90ac4b704fe0e2ea784425 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 22 Feb 2010 11:50:59 +0100 Subject: [PATCH] Put new options in WB ICS-options dialog The Seek-Graph, background-observe and Chat-Box options are added to the ICS options dialog. They only control the appData settings, there are no special actions yet on switching the settings. --- winboard/resource.h | 6 ++++++ winboard/winboard.rc | 12 ++++++++++++ winboard/woptions.c | 13 +++++++++++++ 3 files changed, 31 insertions(+), 0 deletions(-) diff --git a/winboard/resource.h b/winboard/resource.h index 9699ddd..fdad534 100644 --- a/winboard/resource.h +++ b/winboard/resource.h @@ -512,6 +512,12 @@ #define IDC_Focus2 1731 #define IDC_Focus3 1732 #define IDC_Focus4 1733 +#define OPT_SeekGraph 1750 +#define OPT_AutoRefresh 1751 +#define OPT_BgObserve 1752 +#define OPT_DualBoard 1753 +#define OPT_SmartMove 1754 +#define OPT_StartupChatBoxes 1755 #define IDC_SPECIFY_ENG_STATIC 1814 #define IDC_SPECIFY_SERVER_STATIC 1815 #define OPT_MESS 1818 diff --git a/winboard/winboard.rc b/winboard/winboard.rc index 64d20f2..a94ca09 100644 --- a/winboard/winboard.rc +++ b/winboard/winboard.rc @@ -490,6 +490,14 @@ BEGIN BS_AUTOCHECKBOX | WS_TABSTOP,10,51,84,8 CONTROL "&Quiet Play",OPT_QuietPlay,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,64,63,8 + CONTROL "See&k Graph",OPT_SeekGraph,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,10,77,63,8 + CONTROL "auto-&Refresh",OPT_AutoRefresh,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,84,77,63,8 + CONTROL "Bckgnd Obser&ve",OPT_BgObserve,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,10,90,68,8 + CONTROL "&Dual Board",OPT_DualBoard,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,84,90,63,8 CONTROL "&Premove",OPT_Premove,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,160,12,46,10 CONTROL "&White first move",OPT_PremoveWhite,"Button", @@ -498,6 +506,8 @@ BEGIN CONTROL "&Black first move",OPT_PremoveBlack,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,160,40,66,10 EDITTEXT OPT_PremoveBlackText,236,38,25,14,ES_AUTOHSCROLL + CONTROL "One-Click &Move",OPT_SmartMove,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,160,54,100,10 CONTROL "&Sound alarm at",OPT_IcsAlarm,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,160,85,63,10 EDITTEXT OPT_IcsAlarmTime,236,81,26,14,ES_AUTOHSCROLL @@ -545,6 +555,8 @@ BEGIN CONTROL "",OPT_SampleNormal,"RICHEDIT",ES_CENTER | ES_MULTILINE | ES_READONLY | WS_DISABLED | WS_GROUP,159,194,75,15, WS_EX_CLIENTEDGE + LTEXT "Startup &Chat Boxes:",IDC_STATIC,4,251,65,8 + EDITTEXT OPT_StartupChatBoxes,72,249,90,14,ES_AUTOHSCROLL GROUPBOX "Interaction Colors",IDC_STATIC,4,103,294,140 GROUPBOX "Premove",IDC_STATIC,154,0,144,69 GROUPBOX "General",IDC_STATIC,4,0,146,101 diff --git a/winboard/woptions.c b/winboard/woptions.c index 461ce73..fd0ac4c 100644 --- a/winboard/woptions.c +++ b/winboard/woptions.c @@ -1175,6 +1175,11 @@ IcsOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) 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 +1192,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); @@ -1253,12 +1259,19 @@ IcsOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) 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(); -- 1.7.0.4