X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xoptions.c;h=575fc32730471f03bd28cd6f707f3cc68bb1b0fd;hb=f81b07c4e3bcbc2260a348beb8c48df27faa1d81;hp=095136e76a53d18f149b11acd3d57a1f622f2176;hpb=7f968f51c36d6e15fee97107ad7c5b85838c3f68;p=xboard.git diff --git a/xoptions.c b/xoptions.c index 095136e..575fc32 100644 --- a/xoptions.c +++ b/xoptions.c @@ -303,11 +303,16 @@ extern Option installOptions[], matchOptions[]; char *engineNr[] = { N_("First Engine"), N_("Second Engine"), NULL }; char *engineList[100] = {" "}, *engineMnemonic[100] = {""}; -void AppendText(Option *opt, char *s) +int AppendText(Option *opt, char *s) { XawTextBlock t; + char *v; + int len; + GetWidgetText(opt, &v); + len = strlen(v); t.ptr = s; t.firstPos = 0; t.length = strlen(s); t.format = XawFmt8Bit; - XawTextReplace(opt->handle, 9999, 9999, &t); + XawTextReplace(opt->handle, len, len, &t); + return len; } void AddLine(Option *opt, char *s) @@ -377,6 +382,7 @@ Option generalOptions[] = { { 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") }, @@ -1400,8 +1406,11 @@ Option commentOptions[] = { void ClearTextWidget(Option *opt) { - XtCallActionProc(opt->handle, "select-all", NULL, NULL, 0); - XtCallActionProc(opt->handle, "kill-selection", NULL, NULL, 0); +// XtCallActionProc(opt->handle, "select-all", NULL, NULL, 0); +// XtCallActionProc(opt->handle, "kill-selection", NULL, NULL, 0); + Arg arg; + XtSetArg(arg, XtNstring, ""); // clear without disturbing selection! + XtSetValues(opt->handle, &arg, 1); } void ClearComment(int n)