From fa2510397cf9d21b9779690453a3b472e28ad5a1 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 29 May 2009 18:56:06 -0700 Subject: [PATCH] added the Action-menu items that allow the user to adjudicate ongoing games in Two-Machines mode. This was an already existing backend function from Winboard_x; I only had to create a menu item for it to be called. Due to an oversight I had forgotten to do that so far. (Logically, I should have done it in the 4.3.5 release, where I updated the XBoard menus to conform to the WinBoard menus.) I tested them, and they seem to work. (As expected.) --- xboard.c | 37 +++++++++++++++++++++++++++++++++++++ 1 files changed, 37 insertions(+), 0 deletions(-) diff --git a/xboard.c b/xboard.c index 2b14ef9..ed688da 100644 --- a/xboard.c +++ b/xboard.c @@ -346,6 +346,9 @@ void DrawProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); void AbortProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); void AdjournProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); void ResignProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); +void AdjuWhiteProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); +void AdjuBlackProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); +void AdjuDrawProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); void EnterKeyProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); void StopObservingProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); @@ -601,6 +604,10 @@ MenuItem actionMenu[] = { {"----", NothingProc}, {N_("Stop Observing"), StopObservingProc}, {N_("Stop Examining"), StopExaminingProc}, + {"----", NothingProc}, + {N_("Adjudicate to White"), AdjuWhiteProc}, + {N_("Adjudicate to Black"), AdjuBlackProc}, + {N_("Adjudicate Draw"), AdjuDrawProc}, {NULL, NULL} }; @@ -1781,6 +1788,9 @@ XtActionsRec boardActions[] = { { "AdjournProc", AdjournProc }, { "AbortProc", AbortProc }, { "ResignProc", ResignProc }, + { "AdjuWhiteProc", AdjuWhiteProc }, + { "AdjuBlackProc", AdjuBlackProc }, + { "AdjuDrawProc", AdjuDrawProc }, { "EnterKeyProc", EnterKeyProc }, { "StopObservingProc", StopObservingProc }, { "StopExaminingProc", StopExaminingProc }, @@ -6648,6 +6658,33 @@ void ResignProc(w, event, prms, nprms) ResignEvent(); } +void AdjuWhiteProc(w, event, prms, nprms) + Widget w; + XEvent *event; + String *prms; + Cardinal *nprms; +{ + UserAdjudicationEvent(+1); +} + +void AdjuBlackProc(w, event, prms, nprms) + Widget w; + XEvent *event; + String *prms; + Cardinal *nprms; +{ + UserAdjudicationEvent(-1); +} + +void AdjuDrawProc(w, event, prms, nprms) + Widget w; + XEvent *event; + String *prms; + Cardinal *nprms; +{ + UserAdjudicationEvent(0); +} + void EnterKeyProc(w, event, prms, nprms) Widget w; XEvent *event; -- 1.7.0.4