X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xaw%2Fxoptions.c;h=ef8227207114c47fd703b514a6c7fb440d15a01e;hb=24659044481fa42b3846cb9e801fd06abe0a102e;hp=1c0a897b54df6d153a74fcc5e9cc454fc4f5e74f;hpb=4b2e076784b6bfd57781000e1ec809a1dc7ba4a1;p=xboard.git diff --git a/xaw/xoptions.c b/xaw/xoptions.c index 1c0a897..ef82272 100644 --- a/xaw/xoptions.c +++ b/xaw/xoptions.c @@ -839,8 +839,12 @@ GenericCallback (Widget w, XtPointer client_data, XtPointer call_data) XtSetArg(args[0], XtNlabel, &name); XtGetValues(w, args, 1); 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)