X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xaw%2Fxoptions.c;h=502aed1ea3ff14fe8d1dec37f16e127281ba1baf;hb=ebd7f78161504e46896f7d96bb41e29714b2fd53;hp=28fe26064b7a6106118ba44ed88c443c5a8029a9;hpb=0278ebc80411a20fd23303156285e55ce8d2b0a5;p=xboard.git diff --git a/xaw/xoptions.c b/xaw/xoptions.c index 28fe260..502aed1 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*)