Put new options in WB ICS-options dialog
authorH.G. Muller <h.g.muller@hccnet.nl>
Mon, 22 Feb 2010 10:50:59 +0000 (11:50 +0100)
committerH.G. Muller <h.g.muller@hccnet.nl>
Mon, 22 Feb 2010 10:50:59 +0000 (11:50 +0100)
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
winboard/winboard.rc
winboard/woptions.c

index 9699ddd..fdad534 100644 (file)
 #define IDC_Focus2                     1731\r
 #define IDC_Focus3                     1732\r
 #define IDC_Focus4                     1733\r
+#define OPT_SeekGraph                  1750\r
+#define OPT_AutoRefresh                        1751\r
+#define OPT_BgObserve                  1752\r
+#define OPT_DualBoard                  1753\r
+#define OPT_SmartMove                  1754\r
+#define OPT_StartupChatBoxes           1755\r
 #define IDC_SPECIFY_ENG_STATIC          1814\r
 #define IDC_SPECIFY_SERVER_STATIC       1815\r
 #define OPT_MESS                        1818\r
index 64d20f2..a94ca09 100644 (file)
@@ -490,6 +490,14 @@ BEGIN
                     BS_AUTOCHECKBOX | WS_TABSTOP,10,51,84,8\r
     CONTROL         "&Quiet Play",OPT_QuietPlay,"Button",BS_AUTOCHECKBOX | \r
                     WS_TABSTOP,10,64,63,8\r
+    CONTROL         "See&k Graph",OPT_SeekGraph,"Button",BS_AUTOCHECKBOX | \r
+                    WS_TABSTOP,10,77,63,8\r
+    CONTROL         "auto-&Refresh",OPT_AutoRefresh,"Button",BS_AUTOCHECKBOX | \r
+                    WS_TABSTOP,84,77,63,8\r
+    CONTROL         "Bckgnd Obser&ve",OPT_BgObserve,"Button",BS_AUTOCHECKBOX | \r
+                    WS_TABSTOP,10,90,68,8\r
+    CONTROL         "&Dual Board",OPT_DualBoard,"Button",BS_AUTOCHECKBOX | \r
+                    WS_TABSTOP,84,90,63,8\r
     CONTROL         "&Premove",OPT_Premove,"Button",BS_AUTOCHECKBOX | \r
                     WS_TABSTOP,160,12,46,10\r
     CONTROL         "&White first move",OPT_PremoveWhite,"Button",\r
@@ -498,6 +506,8 @@ BEGIN
     CONTROL         "&Black first move",OPT_PremoveBlack,"Button",\r
                     BS_AUTOCHECKBOX | WS_TABSTOP,160,40,66,10\r
     EDITTEXT        OPT_PremoveBlackText,236,38,25,14,ES_AUTOHSCROLL\r
+    CONTROL         "One-Click &Move",OPT_SmartMove,"Button",BS_AUTOCHECKBOX | \r
+                    WS_TABSTOP,160,54,100,10\r
     CONTROL         "&Sound alarm at",OPT_IcsAlarm,"Button",BS_AUTOCHECKBOX | \r
                     WS_TABSTOP,160,85,63,10\r
     EDITTEXT        OPT_IcsAlarmTime,236,81,26,14,ES_AUTOHSCROLL\r
@@ -545,6 +555,8 @@ BEGIN
     CONTROL         "",OPT_SampleNormal,"RICHEDIT",ES_CENTER | ES_MULTILINE | \r
                     ES_READONLY | WS_DISABLED | WS_GROUP,159,194,75,15,\r
                     WS_EX_CLIENTEDGE\r
+    LTEXT           "Startup &Chat Boxes:",IDC_STATIC,4,251,65,8\r
+    EDITTEXT        OPT_StartupChatBoxes,72,249,90,14,ES_AUTOHSCROLL\r
     GROUPBOX        "Interaction Colors",IDC_STATIC,4,103,294,140\r
     GROUPBOX        "Premove",IDC_STATIC,154,0,144,69\r
     GROUPBOX        "General",IDC_STATIC,4,0,146,101\r
index 461ce73..fd0ac4c 100644 (file)
@@ -1175,6 +1175,11 @@ IcsOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
     CHECK_BOX(OPT_GetMoveList, appData.getMoveList);\r
     CHECK_BOX(OPT_LocalLineEditing, appData.localLineEditing);\r
     CHECK_BOX(OPT_QuietPlay, appData.quietPlay);\r
+    CHECK_BOX(OPT_SeekGraph, appData.seekGraph);\r
+    CHECK_BOX(OPT_AutoRefresh, appData.autoRefresh);\r
+    CHECK_BOX(OPT_BgObserve, appData.bgObserve);\r
+    CHECK_BOX(OPT_DualBoard, appData.dualBoard);\r
+    CHECK_BOX(OPT_SmartMove, appData.oneClick);\r
     CHECK_BOX(OPT_Premove, appData.premove);\r
     CHECK_BOX(OPT_PremoveWhite, appData.premoveWhite);\r
     CHECK_BOX(OPT_PremoveBlack, appData.premoveBlack);\r
@@ -1187,6 +1192,7 @@ IcsOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
     SetDlgItemText(hDlg, OPT_IcsAlarmTime, buf);\r
     SetDlgItemText(hDlg, OPT_PremoveWhiteText, appData.premoveWhiteText);\r
     SetDlgItemText(hDlg, OPT_PremoveBlackText, appData.premoveBlackText);\r
+    SetDlgItemText(hDlg, OPT_StartupChatBoxes, appData.chatBoxes);\r
 \r
     SendDlgItemMessage(hDlg, OPT_SampleShout,     EM_SETBKGNDCOLOR, 0, cbc);\r
     SendDlgItemMessage(hDlg, OPT_SampleSShout,    EM_SETBKGNDCOLOR, 0, cbc);\r
@@ -1253,12 +1259,19 @@ IcsOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
       appData.getMoveList      = IS_CHECKED(OPT_GetMoveList);\r
       appData.localLineEditing = IS_CHECKED(OPT_LocalLineEditing);\r
       appData.quietPlay        = IS_CHECKED(OPT_QuietPlay);\r
+      appData.seekGraph        = IS_CHECKED(OPT_SeekGraph);\r
+      appData.autoRefresh      = IS_CHECKED(OPT_AutoRefresh);\r
+      appData.bgObserve        = IS_CHECKED(OPT_BgObserve);\r
+      appData.dualBoard        = IS_CHECKED(OPT_DualBoard);\r
+      appData.oneClick         = IS_CHECKED(OPT_SmartMove);\r
 \r
 #undef IS_CHECKED\r
 \r
       appData.icsAlarmTime = number * 1000;\r
       GetDlgItemText(hDlg, OPT_PremoveWhiteText, appData.premoveWhiteText, 5);\r
       GetDlgItemText(hDlg, OPT_PremoveBlackText, appData.premoveBlackText, 5);\r
+      GetDlgItemText(hDlg, OPT_StartupChatBoxes, buf, sizeof(buf));\r
+      buf[sizeof(buf)-1] = NULLCHAR; appData.chatBoxes = StrSave(buf); // memory leak\r
 \r
       if (appData.localLineEditing) {\r
        DontEcho();\r