XtGetValues(w, args, 1);
j = 1;
XtSetArg(args[0], XtNdisplayCaret, True);
- if(!strchr(s, '\n')) XtSetArg(args[1], XtNinsertPosition, strlen(s)), j++;
+ if(!strchr(s, '\n') && strlen(s) < 80) XtSetArg(args[1], XtNinsertPosition, strlen(s)), j++;
XtSetValues(w, args, j);
XtSetKeyboardFocus((Widget) data, w);
previous = w;
// cloned from Engine Settings dialog (and later merged with it)
-extern WindowPlacement wpComment, wpTags;
+extern WindowPlacement wpComment, wpTags, wpMoveHistory;
char *trialSound;
static int oldCores, oldPonder;
int MakeColors P((void));
Widget shells[10];
Widget marked[10];
Boolean shellUp[10];
-WindowPlacement *wp[10] = { NULL, &wpComment, &wpTags };
+WindowPlacement *wp[10] = { NULL, &wpComment, &wpTags, NULL, NULL, NULL, NULL, &wpMoveHistory };
Option *dialogOptions[10];
void MarkMenu(char *item, int dlgNr)
char *engineNr[] = { N_("First Engine"), N_("Second Engine"), NULL };
char *engineList[100] = {" "}, *engineMnemonic[100] = {""};
-void AddLine(Option *opt, char *s)
+void AppendText(Option *opt, char *s)
{
XawTextBlock t;
t.ptr = s; t.firstPos = 0; t.length = strlen(s); t.format = XawFmt8Bit;
XawTextReplace(opt->handle, 9999, 9999, &t);
- t.ptr = "\n"; t.length = 1;
- XawTextReplace(opt->handle, 9999, 9999, &t);
+}
+
+void AddLine(Option *opt, char *s)
+{
+ AppendText(opt, s);
+ AppendText(opt, "\n");
}
void AddToTourney(int n)
{ 0, 0, 0, NULL, (void*) &appData.ponderNextMove, "", NULL, CheckBox, N_("Ponder Next Move") },
{ 0, 0, 0, NULL, (void*) &appData.popupExitMessage, "", NULL, CheckBox, N_("Popup Exit Messages") },
{ 0, 0, 0, NULL, (void*) &appData.popupMoveErrors, "", NULL, CheckBox, N_("Popup Move Errors") },
+{ 0, 0, 0, NULL, (void*) &appData.showEvalInMoveHistory, "", NULL, CheckBox, N_("Scores in Move List") },
{ 0, 0, 0, NULL, (void*) &appData.showCoords, "", NULL, CheckBox, N_("Show Coordinates") },
{ 0, 0, 0, NULL, (void*) &appData.markers, "", NULL, CheckBox, N_("Show Target Squares") },
{ 0, 0, 0, NULL, (void*) &appData.testLegality, "", NULL, CheckBox, N_("Test Legality") },
{ 0, 1, 0, NULL, (void*) &NewComCallback, "", NULL, EndMark , "" }
};
+void ClearTextWidget(Option *opt)
+{
+ XtCallActionProc(opt->handle, "select-all", NULL, NULL, 0);
+ XtCallActionProc(opt->handle, "kill-selection", NULL, NULL, 0);
+}
+
void ClearComment(int n)
{
- XtCallActionProc(commentOptions[0].handle, "select-all", NULL, NULL, 0);
- XtCallActionProc(commentOptions[0].handle, "kill-selection", NULL, NULL, 0);
+ ClearTextWidget(&commentOptions[0]);
}
void NewCommentPopup(char *title, char *text, int index)
void changeTags(int n)
{
GetWidgetText(¤tOption[1], &tagsText);
- if(bookUp) SaveToBook(tagsText); else\r
+ if(bookUp) SaveToBook(tagsText); else
ReplaceTags(tagsText, &gameInfo);
}
GetWidgetText(&boxOptions[0], &val);
TypeInDoneEvent((char*)val);
}
- PopDown(0);\r
+ PopDown(0);
}
char moveTypeInTranslations[] =