{
static int start;
int i, last;
- char buf[MSG_SIZ];
ranksTmp = filesTmp = sizeTmp = -1; // prefer defaults over actual settings
if(appData.noChessProgram) sprintf(warning, _("Only bughouse is not available in viewer mode.")); else
sprintf(warning, _("All variants not supported by the first engine\n(currently %s) are disabled."), first.tidy);
}
variantDescriptors[start-2].type = (last < 0 ? EndMark : Skip);
variantDescriptors[start-1].type = (last < 6 ? Skip : Break);
- safeStrCpy(buf, engineVariant, MSG_SIZ); *engineVariant = NULLCHAR; // yeghh...
+ safeStrCpy(engineVariant+100, engineVariant, 100); *engineVariant = NULLCHAR; // yeghh...
GenericPopUp(variantDescriptors, _("New Variant"), TransientDlg, BoardWindow, MODAL, 0);
- safeStrCpy(engineVariant, buf, MSG_SIZ); // must temporarily clear to avoid enabling all variant buttons
+ safeStrCpy(engineVariant, engineVariant+100, MSG_SIZ); // must temporarily clear to avoid enabling all variant buttons
}
//------------------------------------------- Common Engine Options -------------------------------------
/* set button color on new variant dialog */
if(option[i].textValue) {
+ static char *b = "Bold";
gdk_color_parse( option[i].textValue, &color );
gtk_widget_modify_bg ( GTK_WIDGET(button), GTK_STATE_NORMAL, &color );
gtk_widget_set_sensitive(button, option[i].value >= 0 && (appData.noChessProgram
|| strstr(first.variants, VariantName(option[i].value))));
+ if(engineVariant[100] ? !strcmp(engineVariant+100, option[i].name) :
+ gameInfo.variant ? option[i].value == gameInfo.variant : !strcmp(option[i].name, "Normal"))
+ SetWidgetFont(gtk_bin_get_child(GTK_BIN(button)), &b);
}
Pack(hbox, table, button, left, left+1, top, 0);