summaryrefslogtreecommitdiff
path: root/src/Fl_File_Chooser2.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-05-01 08:51:59 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-05-01 08:51:59 +0000
commitb338c743b4423976a98860dab4a231e176e76385 (patch)
tree9d22a3452e39cce7ac91a1e386fb077a6beeafc7 /src/Fl_File_Chooser2.cxx
parent43b4048b9c613e23ce80e2ce9c96cf30334fe931 (diff)
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
Diffstat (limited to 'src/Fl_File_Chooser2.cxx')
-rw-r--r--src/Fl_File_Chooser2.cxx9
1 files changed, 6 insertions, 3 deletions
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 $".
//