Suggest default file name in browser dialog
authorH.G. Muller <h.g.muller@hccnet.nl>
Sat, 31 Jul 2010 20:48:45 +0000 (22:48 +0200)
committerArun Persaud <arun@nubati.net>
Mon, 2 Aug 2010 07:58:30 +0000 (00:58 -0700)
The argument 'def' to FileNamePopUp() was not passed through to the new
file-browser routine, which got NULL in stead, and thus started with an
empty input field.

xboard.c

index 475128d..ae13c6f 100644 (file)
--- a/xboard.c
+++ b/xboard.c
@@ -5146,7 +5146,7 @@ void FileNamePopUp(label, def, proc, openMode)
        int index; // this is not supported yet
        FILE *f;
        if(f = XsraSelFile(shellWidget, label, NULL, NULL, "could not open: ",
-           NULL, openMode, NULL, &name))
+           def, openMode, NULL, &name))
                (void) (*fileProc)(f, index=0, name);
     }
 }