From 11fccec026701adbe5201e4b655c1234b8388228 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 28 Apr 2002 08:42:33 +0000 Subject: Fix which icon is shown in FLUID (had it backwards) Set pattern, type, etc. before setting value in file chooser. Otherwise the filename wouldn't get highlighted the second time it was shown. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2120 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/fl_file_dir.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/fl_file_dir.cxx b/src/fl_file_dir.cxx index 56fbf9cfe..c1d0f6d4f 100644 --- a/src/fl_file_dir.cxx +++ b/src/fl_file_dir.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_file_dir.cxx,v 1.1.2.8 2002/04/24 12:14:57 easysw Exp $" +// "$Id: fl_file_dir.cxx,v 1.1.2.9 2002/04/28 08:42:33 easysw Exp $" // // File chooser widget for the Fast Light Tool Kit (FLTK). // @@ -53,6 +53,10 @@ char* fl_file_chooser(const char* message, const char* pat, const char* fname) fc = new Fl_File_Chooser(fname, pat, Fl_File_Chooser::CREATE, message); fc->callback(callback, 0); } else { + fc->type(Fl_File_Chooser::CREATE); + fc->filter(pat); + fc->label(message); + if (!fname || !*fname) { if (fc->filter() != pat && (!pat || !fc->filter() || strcmp(pat, fc->filter())) && fc->value()) { @@ -77,10 +81,6 @@ char* fl_file_chooser(const char* message, const char* pat, const char* fname) } else fc->value(fname); - - fc->type(Fl_File_Chooser::CREATE); - fc->filter(pat); - fc->label(message); } fc->show(); @@ -127,5 +127,5 @@ char* fl_dir_chooser(const char* message, const char* fname) // -// End of "$Id: fl_file_dir.cxx,v 1.1.2.8 2002/04/24 12:14:57 easysw Exp $". +// End of "$Id: fl_file_dir.cxx,v 1.1.2.9 2002/04/28 08:42:33 easysw Exp $". // -- cgit v1.2.3