From b338c743b4423976a98860dab4a231e176e76385 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Wed, 1 May 2002 08:51:59 +0000 Subject: Fix FLUID so that open_cb() and open_history_cb() set the filename before reading the file so that images are loaded properly. Return NULL if no file is selected in the file chooser. Add Fl_File_Input to FLUID. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2154 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_File_Chooser2.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/Fl_File_Chooser2.cxx') diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index e696837a4..57696eb11 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.9 2002/05/01 08:28:59 easysw Exp $" +// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.10 2002/05/01 08:51:59 easysw Exp $" // // More Fl_File_Chooser routines. // @@ -228,7 +228,10 @@ Fl_File_Chooser::value(int f) // I - File number { name = fileName->value(); if (name[0] == '\0') return NULL; - else return name; + else if (fl_filename_isdir(name)) { + if (type_ & DIRECTORY) return name; + else return NULL; + } else return name; } for (i = 1, count = 0; i <= fileList->size(); i ++) @@ -698,5 +701,5 @@ Fl_File_Chooser::fileNameCB() // -// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.9 2002/05/01 08:28:59 easysw Exp $". +// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.10 2002/05/01 08:51:59 easysw Exp $". // -- cgit v1.2.3