Make generic XBoard popup, and implement 2 dialogs
The Engine-Settings dialog of XBoard was cloned to work on predefined
lists of (XBoard) options, rather than engine options. An extra field
was added to the Option struct, to hold a pointer to the XBoard variable
that should hold the option setting, so on OK'ing the dialog the altered
values can be copied there. Not usable for options which should trigger
an action (like redraw, or sending something to the engine).
A Load Game, Save Game and ICS Options dialog were then defined by
tables fed to GenericPopUp(). Options set from these dialogs were removed
from the main Option menu, which removes a lot of code from xboard.c
(for checkmarking, disabling the menu items).
A button defined in the GenericPopUp can attain the color indicated
by a previous text field, and add a callback to change the color in a
spin-like manner (but using R G B W in stead of + - butons).
The EndMark option can specify a callback, to be used on OK.
A non-zero max field in the Option descriptor will be used to set the
width of ComboBox, TextBox and Button optons.
The elements are chained such that extra space goes fully into the input
fields. A label type is added for clarifying texts that would not fit in
the option names. A break-type (pseudo-)option is added. Make OK and
cancel button suppressable in generic popup (by 2 bit of the option.min
field).