X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gtk%2Fxoptions.c;h=b6b38b6fdb79139018c8ecf706c880ba2b7b1eb1;hb=24659044481fa42b3846cb9e801fd06abe0a102e;hp=fbe1c232b4cc10be5e8cf25c0e15880da90f3541;hpb=4b2e076784b6bfd57781000e1ec809a1dc7ba4a1;p=xboard.git diff --git a/gtk/xoptions.c b/gtk/xoptions.c index fbe1c23..b6b38b6 100644 --- a/gtk/xoptions.c +++ b/gtk/xoptions.c @@ -1097,8 +1097,12 @@ void GenericCallback(GtkWidget *widget, gpointer gdata) if(currentCps) { name = gtk_button_get_label (GTK_BUTTON(widget)); if(currentOption[data].type == SaveButton) GenericReadout(currentOption, -1); - snprintf(buf, MSG_SIZ, "option %s\n", name); - SendToProgram(buf, currentCps); + if(data == 0) { // XBoard save button + SaveEngineSettings(currentCps == &second); PopDown(dlg); + } else { + snprintf(buf, MSG_SIZ, "option %s\n", name); + SendToProgram(buf, currentCps); + } } else ((ButtonCallback*) currentOption[data].target)(data); shells[dlg] = oldSh; // in case of multiple instances, restore previous (as this one could be popped down now)