X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xoptions.c;h=7e7eed872106c92a1c634f6b1f98442393bde0ac;hb=55d82733a8c6a6e29280bb6413fb2037cbcd381b;hp=a6a305996ce2f4017e0b3d9c03069543e1e8f457;hpb=a31d0897123ab90c8d4a8304619834079c3ad5a9;p=xboard.git diff --git a/xoptions.c b/xoptions.c index a6a3059..7e7eed8 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) @@ -360,6 +365,7 @@ int GeneralOptionsOK(int n) } Option generalOptions[] = { +{ 0, 0, 0, NULL, (void*) &appData.whitePOV, "", NULL, CheckBox, N_("Absolute Analysis Scores") }, { 0, 0, 0, NULL, (void*) &appData.sweepSelect, "", NULL, CheckBox, N_("Almost Always Queen (Detour Under-Promote)") }, { 0, 0, 0, NULL, (void*) &appData.animateDragging, "", NULL, CheckBox, N_("Animate Dragging") }, { 0, 0, 0, NULL, (void*) &appData.animate, "", NULL, CheckBox, N_("Animate Moving") }, @@ -384,6 +390,7 @@ Option generalOptions[] = { { 0, 0, 10, NULL, (void*) &appData.flashCount, "", NULL, Spin, N_("Flash Moves (0 = no flashing):") }, { 0, 1, 10, NULL, (void*) &appData.flashRate, "", NULL, Spin, N_("Flash Rate (high = fast):") }, { 0, 5, 100,NULL, (void*) &appData.animSpeed, "", NULL, Spin, N_("Animation Speed (high = slow):") }, +{ 0, 1, 5, NULL, (void*) &appData.zoom, "", NULL, Spin, N_("Zoom factor in Evaluation Graph:") }, { 0, 0, 0, NULL, (void*) &GeneralOptionsOK, "", NULL, EndMark , "" } }; @@ -447,8 +454,9 @@ Option variantDescriptors[] = { { VariantSuicide, 0, 135, NULL, (void*) &Pick, "#FFFFBF", NULL, Button, N_("suicide")}, { VariantCapaRandom, 1, 135, NULL, (void*) &Pick, "#BFBFFF", NULL, Button, N_("CRC (10x8)")}, { VariantGiveaway, 0, 135, NULL, (void*) &Pick, "#FFFFBF", NULL, Button, N_("give-away")}, -{ VariantSpartan, 1, 135, NULL, (void*) &Pick, "#FF0000", NULL, Button, N_("Spartan")}, +{ VariantGrand, 1, 135, NULL, (void*) &Pick, "#5070FF", NULL, Button, N_("grand (10x10)")}, { VariantLosers, 0, 135, NULL, (void*) &Pick, "#FFFFBF", NULL, Button, N_("losers")}, +{ VariantSpartan, 1, 135, NULL, (void*) &Pick, "#FF0000", NULL, Button, N_("Spartan")}, { 0, 0, 0, NULL, NULL, NULL, NULL, Label, N_("Board size ( -1 = default for selected variant):")}, { 0, -1, BOARD_RANKS-1, NULL, (void*) &appData.NrRanks, "", NULL, Spin, N_("Number of Board Ranks:") }, { 0, -1, BOARD_FILES, NULL, (void*) &appData.NrFiles, "", NULL, Spin, N_("Number of Board Files:") }, @@ -1401,8 +1409,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) @@ -1670,6 +1681,7 @@ int TcOK(int n) if(tcType == 0 && tmpMoves <= 0) return 0; if(tcType == 2 && tmpInc <= 0) return 0; GetWidgetText(¤tOption[4], &tc); // get original text, in case it is min:sec + searchTime = 0; switch(tcType) { case 0: if(!ParseTimeControl(tc, -1, tmpMoves)) return 0;