if(q) *q++ = 0;\r
if(*p) ChatPopUp(p);\r
} while(p=q);\r
-// Sleep(1000);\r
}\r
SetActiveWindow(hwndConsole);\r
}\r
break;\r
\r
case IDM_Revert:\r
- RevertEvent();\r
+ RevertEvent(FALSE);\r
+ break;\r
+\r
+ case IDM_Annotate: // [HGM] vari: revert with annotation\r
+ RevertEvent(TRUE);\r
break;\r
\r
case IDM_TruncateGame:\r
{ // [HGM] vari: for retracting variations in local mode\r
HMENU hmenu = GetMenu(hwndMain);\r
EnableMenuItem(hmenu, IDM_Revert, MF_BYCOMMAND|(grey ? MF_GRAYED : MF_ENABLED));\r
+ EnableMenuItem(hmenu, IDM_Annotate, MF_BYCOMMAND|(grey ? MF_GRAYED : MF_ENABLED));\r
}\r
\r
VOID\r
{ IDM_StopObserving, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_Upload, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_Revert, MF_BYCOMMAND|MF_GRAYED },\r
+ { IDM_Annotate, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_NewChat, MF_BYCOMMAND|MF_GRAYED },\r
{ -1, -1 }\r
};\r
{ IDM_IcsOptions, MF_BYCOMMAND|MF_ENABLED },\r
{ IDM_Engine1Options, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_Engine2Options, MF_BYCOMMAND|MF_GRAYED },\r
+ { IDM_Annotate, MF_BYCOMMAND|MF_GRAYED },\r
{ -1, -1 }\r
};\r
\r
{ IDM_IcsClient, MF_BYCOMMAND|MF_GRAYED },\r
{ ACTION_POS, MF_BYPOSITION|MF_GRAYED },\r
{ IDM_Revert, MF_BYCOMMAND|MF_GRAYED },\r
+ { IDM_Annotate, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_MoveNow, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_RetractMove, MF_BYCOMMAND|MF_GRAYED },\r
{ IDM_TimeControl, MF_BYCOMMAND|MF_GRAYED },\r
void ToStartProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms));
void ToEndProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms));
void RevertProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms));
+void AnnotateProc P((Widget w, XEvent *event, String *prms, Cardinal *nprms));
void TruncateGameProc P((Widget w, XEvent *event, String *prms,
Cardinal *nprms));
void RetractMoveProc P((Widget w, XEvent *event, String *prms,
{N_("Back to Start"), ToStartProc},
{N_("Forward to End"), ToEndProc},
{N_("Revert"), RevertProc},
+ {N_("Annotate"), AnnotateProc},
{N_("Truncate Game"), TruncateGameProc},
{"----", NothingProc},
{N_("Move Now"), MoveNowProc},
{ "ToStartProc", ToStartProc },
{ "ToEndProc", ToEndProc },
{ "RevertProc", RevertProc },
+ { "AnnotateProc", AnnotateProc },
{ "TruncateGameProc", TruncateGameProc },
{ "MoveNowProc", MoveNowProc },
{ "RetractMoveProc", RetractMoveProc },
} else {
XtSetSensitive(w, !grey);
}
+ w = XtNameToWidget(menuBarWidget, "menuStep.Annotate");
+ if (w == NULL) {
+ DisplayError("menuStep.Annotate", 0);
+ } else {
+ XtSetSensitive(w, !grey);
+ }
}
void
{ "menuOptions.Hide Thinking", False },
{ "menuOptions.Ponder Next Move", False },
#endif
+ { "menuStep.Annotate", False },
{ NULL, False }
};
{ "menuMode.ICS Input Box", False },
{ "Action", False },
{ "menuStep.Revert", False },
+ { "menuStep.Annotate", False },
{ "menuStep.Move Now", False },
{ "menuStep.Retract Move", False },
{ "menuOptions.Auto Comment", False },
{ "menuAction.Stop Observing", False },
{ "menuAction.Upload to Examine", False },
{ "menuStep.Revert", False },
+ { "menuStep.Annotate", False },
{ "menuOptions.Auto Comment", False },
{ "menuOptions.Auto Observe", False },
{ "menuOptions.Auto Raise Board", False },
String *prms;
Cardinal *nprms;
{
- RevertEvent();
+ RevertEvent(False);
+}
+
+void AnnotateProc(w, event, prms, nprms)
+ Widget w;
+ XEvent *event;
+ String *prms;
+ Cardinal *nprms;
+{
+ RevertEvent(True);
}
void TruncateGameProc(w, event, prms, nprms)