From 167d8bea427f980116580f6a2697c25c55d769c2 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 26 Aug 2013 19:52:11 +0200 Subject: [PATCH] Add checkboxes for autoDisplayTags/Comments in menu WB The auto-display options can now be controlled from the Genral Options menu dialog through two new checkboxes. --- winboard/resource.h | 1 + winboard/winboard.rc | 10 +++++++--- winboard/woptions.c | 5 +++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/winboard/resource.h b/winboard/resource.h index 7bc3e69..62d7406 100644 --- a/winboard/resource.h +++ b/winboard/resource.h @@ -443,6 +443,7 @@ #define OPT_ExtraInfoInMoveHistory 1437 #define OPT_HighlightMoveArrow 1438 #define OPT_AutoLogo 1439 +#define OPT_AutoTags 1440 #define IDC_BUTTON1 1440 #define IDC_BrowseForPolyglotDir 1440 #define IDC_BrowseForEGTB 1441 diff --git a/winboard/winboard.rc b/winboard/winboard.rc index 7c2d4be..2656e7b 100644 --- a/winboard/winboard.rc +++ b/winboard/winboard.rc @@ -445,7 +445,7 @@ BEGIN PUSHBUTTON "Cancel",IDCANCEL,208,86,50,14 END -DLG_GeneralOptions DIALOG DISCARDABLE 0, 0, 300, 197 +DLG_GeneralOptions DIALOG DISCARDABLE 0, 0, 300, 211 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "General Options" FONT 8, "MS Sans Serif" @@ -498,8 +498,12 @@ BEGIN "Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,160,151,10 CONTROL "One-Click Move",OPT_SmartMove, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,156,160,151,10 - DEFPUSHBUTTON "OK",IDOK,180,178,50,14 - PUSHBUTTON "Cancel",IDCANCEL,236,178,50,14 + CONTROL "auto-Display Tags",OPT_AutoTags, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,174,151,10 + CONTROL "auto-Display Comment",OPT_AutoComment, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,156,174,151,10 + DEFPUSHBUTTON "OK",IDOK,180,192,50,14 + PUSHBUTTON "Cancel",IDCANCEL,236,192,50,14 END DLG_IcsOptions DIALOGEX 0, 0, 302, 268 diff --git a/winboard/woptions.c b/winboard/woptions.c index a97248b..8a8406a 100644 --- a/winboard/woptions.c +++ b/winboard/woptions.c @@ -210,6 +210,8 @@ GeneralOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) CHECK_BOX(OPT_HighlightMoveArrow, appData.highlightMoveWithArrow); CHECK_BOX(OPT_AutoLogo, appData.autoLogo); // [HGM] logo CHECK_BOX(OPT_SmartMove, appData.oneClick); // [HGM] one-click + CHECK_BOX(OPT_AutoTags, appData.autoDisplayTags); // [HGM] + CHECK_BOX(OPT_AutoComment, appData.autoDisplayComment); // [HGM] #undef CHECK_BOX @@ -259,6 +261,8 @@ GeneralOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) appData.highlightMoveWithArrow=IS_CHECKED(OPT_HighlightMoveArrow); appData.autoLogo =IS_CHECKED(OPT_AutoLogo); // [HGM] logo appData.oneClick =IS_CHECKED(OPT_SmartMove); // [HGM] one-click + appData.autoDisplayTags =IS_CHECKED(OPT_AutoTags); // [HGM] + appData.autoDisplayComment =IS_CHECKED(OPT_AutoComment); // [HGM] #undef IS_CHECKED @@ -695,6 +699,7 @@ BoardOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) } DeleteObject(pieces[0]); DeleteObject(pieces[1]); + DeleteObject(pieces[2]); return TRUE; -- 1.7.0.4