X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xaw%2Fxoptions.c;h=153ca4368cac2b65b0e94586792739b8025bb76f;hb=a2f3d790becbea6cd93ec51add89f2251a90bba4;hp=8f02a14078762ec1771d3c4c3e4177f59192975d;hpb=4011e8678d85310eedf19fd00aa5d96a9a60770a;p=xboard.git diff --git a/xaw/xoptions.c b/xaw/xoptions.c index 8f02a14..153ca43 100644 --- a/xaw/xoptions.c +++ b/xaw/xoptions.c @@ -189,6 +189,12 @@ SetWidgetLabel (Option *opt, char *buf) } void +SetComboChoice (Option *opt, char *n) +{ + SetWidgetText(opt, opt->choice[n]); +} + +void SetDialogTitle (DialogClass dlg, char *title) { Arg args[16]; @@ -1130,8 +1136,10 @@ GenericPopUp (Option *option, char *title, DialogClass dlgNr, DialogClass parent option[i].max /* w */, shrink ? textHeight : 0 /* h */, option[i].min & 0xE | chain /* chain */); XtSetArg(args[j], XtNlabel, _(option[i].name)); j++; if(option[i].textValue && *option[i].textValue == '#') { // special for buttons of New Variant dialog + char *p, *v, n = option[i].value; + if(n) v = VariantName(n), p = strstr(first.variants, v); XtSetArg(args[j], XtNsensitive, option[i].value >= 0 && (appData.noChessProgram - || strstr(first.variants, VariantName(option[i].value)))); j++; + || p && (!*v || strlen(p) == strlen(v) || p[strlen(v)] == ','))); j++; XtSetArg(args[j], XtNborderWidth, (gameInfo.variant == option[i].value)+1); j++; } option[i].handle = (void*)