Let file browser filter on extension
A new text field is added in the file-browse dialog, to hold (space-
separated) extensions, on which the filenames are then filtered. This
field is initialized by the caller, depending on what we need the file
for, but can be changed by the user. (Directories are always displayed!)
Changes in the extension field become effective after typing a return
in it. Escape typed in the extension field gives focus to the filename
field, and restores the contents. Escape in the filename field cancels
the dialog, return ther OKs it. The extension filter of the browser is
initialized to the extension (if any) of the file currently in the text
edit you are browsing for.
When re-opening the file browser from the XBoard File menu, and there
is no suggested filename, it will now start with the last succesfully
opened name as suggestion. Calling the browser with a NULL argument
for the suggested filename requests that (unlike calling with an empty
string, which will start it in the current directory). To make this
work smoothly, the filebrowser saves the last used name on entry, so it
can be restored on cancel, so that a cancelled browse session really
erases all memory of it.