Implement saving of (modified) engine settings
[xboard.git] / xaw / xoptions.c
index 1c517ac..ef82272 100644 (file)
@@ -289,6 +289,11 @@ AppendColorized (Option *opt, char *message, int count)
 }
 
 void
+ApplyFont (Option *opt, char *font)
+{ // dummy
+}
+
+void
 Show (Option *opt, int hide)
 {
     static Dimension h;
@@ -834,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)
@@ -1441,3 +1450,8 @@ FileNamePopUpWrapper (char *label, char *def, char *filter, FileProc proc, Boole
 {
     Browse(BoardWindow, label, (def[0] ? def : NULL), filter, False, openMode, openName, openFP);
 }
+
+void
+LockBoardSize (int after)
+{
+}