summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-06-06 21:26:12 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-06-06 21:26:12 +0000
commit5c17a15fd444acdc1c8e6bd8de2ba5669042b958 (patch)
tree40227fd6c03b7fe43e214ef34aabc3171d472624
parent16de7b6048bbc01ed0cf3a7bced4c94d10334f7c (diff)
Cancel button fix for the current file chooser (same fix will have to
go into the new one...) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2284 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/Fl_File_Chooser2.cxx18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx
index 81940478f..488898c6c 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.13 2002/05/16 12:47:43 easysw Exp $"
+// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.14 2002/06/06 21:26:12 easysw Exp $"
//
// More Fl_File_Chooser routines.
//
@@ -31,7 +31,7 @@
// Fl_File_Chooser::newdir() - Make a new directory.
// Fl_File_Chooser::rescan() - Rescan the current directory.
// Fl_File_Chooser::fileListCB() - Handle clicks (and double-clicks) in the
-// FileBrowser.
+// FileBrowser.
// Fl_File_Chooser::fileNameCB() - Handle text entry in the FileBrowser.
//
@@ -173,16 +173,8 @@ Fl_File_Chooser::count()
if (filename == NULL || filename[0] == '\0')
return (0);
- // Is the file name a directory?
- if (directory_[0] != '\0')
- snprintf(pathname, sizeof(pathname), "%s/%s", directory_, filename);
- else
- strlcpy(pathname, filename, sizeof(pathname));
-
- if (fl_filename_isdir(pathname))
- return (0);
- else
- return (1);
+ // Is the file name just the current directory?
+ return (strcmp(filename, directory_) != 0);
}
for (i = 1, count = 0; i <= fileList->size(); i ++)
@@ -683,5 +675,5 @@ Fl_File_Chooser::fileNameCB()
//
-// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.13 2002/05/16 12:47:43 easysw Exp $".
+// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.14 2002/06/06 21:26:12 easysw Exp $".
//