summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-10-29 20:12:36 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-10-29 20:12:36 +0000
commit263f2ed1e6ef29556d69d57f0c2f9a206478fc45 (patch)
tree5317527620f9c344efc70823d7c42111228c769f /src
parent521ab78b9a2ae324f158836c6199374ded8f4986 (diff)
Fix OK button when doing directory selection.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2708 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_File_Chooser2.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx
index ff4976abb..3079388cd 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.25 2002/10/29 20:07:34 easysw Exp $"
+// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.26 2002/10/29 20:12:36 easysw Exp $"
//
// More Fl_File_Chooser routines.
//
@@ -779,13 +779,18 @@ Fl_File_Chooser::rescan()
{
char pathname[1024]; // New pathname for filename field
+
// Clear the current filename
strlcpy(pathname, directory_, sizeof(pathname));
if (pathname[0] && pathname[strlen(pathname) - 1] != '/') {
strlcat(pathname, "/", sizeof(pathname));
}
fileName->value(pathname);
- okButton->deactivate();
+
+ if (type_ & DIRECTORY)
+ okButton->activate();
+ else
+ okButton->deactivate();
// Build the file list...
fileList->load(directory_, sort);
@@ -1147,5 +1152,5 @@ unquote_pathname(char *dst, // O - Destination string
//
-// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.25 2002/10/29 20:07:34 easysw Exp $".
+// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.26 2002/10/29 20:12:36 easysw Exp $".
//