{ VariantShogi, SAME_ROW, 135, NULL, (void*) &Pick, "#BFFFFF", NULL, Button, N_("shogi (9x9)")},
{ VariantSpartan, 0, 135, NULL, (void*) &Pick, "#FF0000", NULL, Button, N_("Spartan")},
{ VariantXiangqi, SAME_ROW,135, NULL, (void*) &Pick, "#BFFFFF", NULL, Button, N_("xiangqi (9x10)")},
-{ VariantNormal, 0, 135, NULL, (void*) &Pick, "#FFFFFF", NULL, Button, N_(" ")}, // dummy, to have good alignment
+{ -1, 0, 135, NULL, (void*) &Pick, "#FFFFFF", NULL, Button, N_(" ")}, // dummy, to have good alignment
{ VariantCourier, SAME_ROW,135, NULL, (void*) &Pick, "#BFFFBF", NULL, Button, N_("courier (12x8)")},
{ 0, NO_OK, 0, NULL, NULL, "", NULL, EndMark , "" }
};
if(option[i].textValue) {
gdk_color_parse( option[i].textValue, &color );
gtk_widget_modify_bg ( GTK_WIDGET(button), GTK_STATE_NORMAL, &color );
- gtk_widget_set_sensitive(button, appData.noChessProgram || option[i].value < 0
- || strstr(first.variants, VariantName(option[i].value)));
+ gtk_widget_set_sensitive(button, option[i].value >= 0 && (appData.noChessProgram
+ || strstr(first.variants, VariantName(option[i].value))));
}
Pack(hbox, table, button, left, left+1, top, 0);
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) { // special for buttons of New Variant dialog
- XtSetArg(args[j], XtNsensitive, appData.noChessProgram || option[i].value < 0
- || strstr(first.variants, VariantName(option[i].value))); j++;
+ XtSetArg(args[j], XtNsensitive, option[i].value >= 0 && (appData.noChessProgram
+ || strstr(first.variants, VariantName(option[i].value)))); j++;
XtSetArg(args[j], XtNborderWidth, (gameInfo.variant == option[i].value)+1); j++;
}
option[i].handle = (void*)