X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=dialogs.c;h=046fbc6df5366058d2dcfb28c50eb1c824e0c01e;hb=e131fadbb0f396098fb300283227bdf042c71d45;hp=11c6c7ae126efa41caae98b12998d1801a1d8ccf;hpb=9addf5a6f332430b00c36e5df8ca13040c2190a5;p=xboard.git diff --git a/dialogs.c b/dialogs.c index 11c6c7a..046fbc6 100644 --- a/dialogs.c +++ b/dialogs.c @@ -2296,4 +2296,26 @@ Browse (DialogClass dlg, char *label, char *proposed, char *ext, Boolean pathFla SetWidgetLabel(&browseOptions[9], FileTypes[j]); } +static char *openName; +FileProc fileProc; +char *fileOpenMode; +FILE *openFP; + +void +DelayedLoad () +{ + (void) (*fileProc)(openFP, 0, openName); +} + +void +FileNamePopUp (char *label, char *def, char *filter, FileProc proc, char *openMode) +{ + fileProc = proc; /* I can't see a way not */ + fileOpenMode = openMode; /* to use globals here */ + { // [HGM] use file-selector dialog stolen from Ghostview + // int index; // this is not supported yet + Browse(BoardWindow, label, (def[0] ? def : NULL), filter, False, openMode, &openName, &openFP); + } +} +