summaryrefslogtreecommitdiff
path: root/src/Fl_File_Chooser2.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-04-08 15:48:28 +0000
committerManolo Gouy <Manolo>2016-04-08 15:48:28 +0000
commit90682dbd481fca9b7b5b16086f3ac101081e8de5 (patch)
tree4157e2ca66d43f34431cf482e8c59d85ed3fcaa0 /src/Fl_File_Chooser2.cxx
parent62952ea2952768d922e2c93bcaa67e05c419f5a3 (diff)
Rewrite filename_isdir.cxx for the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11555 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_File_Chooser2.cxx')
-rw-r--r--src/Fl_File_Chooser2.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx
index d592ff39f..d79466987 100644
--- a/src/Fl_File_Chooser2.cxx
+++ b/src/Fl_File_Chooser2.cxx
@@ -344,7 +344,8 @@
//
#include <FL/Fl_File_Chooser.H>
-#include <FL/Fl_System_Driver.H> // for struct stat
+#include <FL/Fl_System_Driver.H>
+#include <FL/Fl.H>
#include <FL/filename.H>
#include <FL/fl_ask.H>
#include <FL/x.H>
@@ -724,9 +725,9 @@ Fl_File_Chooser::fileListCB()
if (Fl::event_clicks()) {
#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
if ((strlen(pathname) == 2 && pathname[1] == ':') ||
- _fl_filename_isdir_quick(pathname))
+ Fl::system_driver()->filename_isdir_quick(pathname))
#else
- if (_fl_filename_isdir_quick(pathname))
+ if (Fl::system_driver()->filename_isdir_quick(pathname))
#endif /* WIN32 || __EMX__ */
{
// Change directories...
@@ -790,7 +791,7 @@ Fl_File_Chooser::fileListCB()
if (callback_) (*callback_)(this, data_);
// Activate the OK button as needed...
- if (!_fl_filename_isdir_quick(pathname) || (type_ & DIRECTORY))
+ if (!Fl::system_driver()->filename_isdir_quick(pathname) || (type_ & DIRECTORY))
okButton->activate();
else
okButton->deactivate();
@@ -857,15 +858,15 @@ Fl_File_Chooser::fileNameCB()
// Enter pressed - select or change directory...
#if (defined(WIN32) && ! defined(__CYGWIN__)) || defined(__EMX__)
if ((isalpha(pathname[0] & 255) && pathname[1] == ':' && !pathname[2]) ||
- (_fl_filename_isdir_quick(pathname) &&
+ (Fl::system_driver()->filename_isdir_quick(pathname) &&
compare_dirnames(pathname, directory_))) {
#else
- if (_fl_filename_isdir_quick(pathname) &&
+ if (Fl::system_driver()->filename_isdir_quick(pathname) &&
compare_dirnames(pathname, directory_)) {
#endif /* WIN32 || __EMX__ */
directory(pathname);
} else if ((type_ & CREATE) || access(pathname, 0) == 0) {
- if (!_fl_filename_isdir_quick(pathname) || (type_ & DIRECTORY)) {
+ if (!Fl::system_driver()->filename_isdir_quick(pathname) || (type_ & DIRECTORY)) {
// Update the preview box...
update_preview();