From: H.G. Muller Date: Sat, 30 May 2009 01:56:06 +0000 (-0700) Subject: added the Action-menu items that allow the user to adjudicate ongoing games in Two... X-Git-Tag: v4.4.0.alpha4~6 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=fa2510397cf9d21b9779690453a3b472e28ad5a1;p=xboard.git 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.) --- 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;