Fix vscrolling in XBoard Engine-Output window
[xboard.git] / xboard.c
index 233e3cd..e5822a4 100644 (file)
--- a/xboard.c
+++ b/xboard.c
@@ -2798,6 +2798,7 @@ Enables icsEnables[] = {
     { "menuEngine.Engine #2 Settings", False },
     { "menuEngine.Load Engine", False },
     { "menuEdit.Annotate", False },
+    { "menuOptions.Match", False },
     { NULL, False }
 };
 
@@ -2924,7 +2925,7 @@ Enables machineThinkingEnables[] = {
   { "menuMode.Machine White", False },
   { "menuMode.Machine Black", False },
   { "menuMode.Two Machines", False },
-  { "menuMode.Machine Match", False },
+//  { "menuMode.Machine Match", False },
   { "menuEngine.Retract Move", False },
   { NULL, False }
 };
@@ -2943,7 +2944,7 @@ Enables userThinkingEnables[] = {
   { "menuMode.Machine White", True },
   { "menuMode.Machine Black", True },
   { "menuMode.Two Machines", True },
-  { "menuMode.Machine Match", True },
+//  { "menuMode.Machine Match", True },
   { "menuEngine.Retract Move", True },
   { NULL, False }
 };
@@ -3986,7 +3987,7 @@ void PieceMenuPopup(w, event, params, num_params)
      String *params;
      Cardinal *num_params;
 {
-    String whichMenu; int menuNr;
+    String whichMenu; int menuNr = -2;
     shiftKey = strcmp(params[0], "menuW"); // used to indicate black
     if (event->type == ButtonRelease)
         menuNr = RightClick(Release, event->xbutton.x, event->xbutton.y, &pmFromX, &pmFromY);
@@ -5307,6 +5308,8 @@ void ModeHighlight()
        XtSetValues(XtNameToWidget(menuBarWidget, wname), args, 1);
     }
     oldmode = gameMode;
+    XtSetArg(args[0], XtNleftBitmap, matchMode && matchGame < appData.matchGames ? xMarkPixmap : None);
+    XtSetValues(XtNameToWidget(menuBarWidget, "menuMode.Machine Match"), args, 1);
 
     /* Maybe all the enables should be handled here, not just this one */
     XtSetSensitive(XtNameToWidget(menuBarWidget, "menuMode.Training"),
@@ -5832,8 +5835,6 @@ void MatchProc(w, event, prms, nprms)
      String *prms;
      Cardinal *nprms;
 {
-    if(gameMode != BeginningOfGame) { DisplayError(_("You can only start a match from the initial position."), 0); return; }
-    appData.matchGames = appData.defaultMatchGames;
     MatchEvent(2);\r
 }
 
@@ -6763,6 +6764,8 @@ void DisplayMessage(message, extMessage)
        };
     };
 
+    safeStrCpy(lastMsg, message, MSG_SIZ); // [HGM] make available
+
   /* need to test if messageWidget already exists, since this function
      can also be called during the startup, if for example a Xresource
      is not set up correctly */