diff options
| -rw-r--r-- | CHANGES | 5 | ||||
| -rw-r--r-- | src/Fl_Group.cxx | 7 | ||||
| -rw-r--r-- | src/fl_file_dir.cxx | 26 |
3 files changed, 30 insertions, 8 deletions
@@ -1,5 +1,10 @@ CHANGES IN FLTK 1.1.0b11 + - Fixed a minor event propagation bug in Fl_Group that + caused mousewheel events to be passed to scrollbars + that were not visible. + - The fl_file_chooser() function did not preserve the + old file/directory like the old file chooser did. - The prototypes for fl_input() and fl_password() did not default the "default value" to NULL. - Fl_Tabs now draws tabs using the selection_color() of diff --git a/src/Fl_Group.cxx b/src/Fl_Group.cxx index ce5bc1ca2..c4846f573 100644 --- a/src/Fl_Group.cxx +++ b/src/Fl_Group.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Group.cxx,v 1.8.2.8.2.9 2002/01/01 15:11:30 easysw Exp $" +// "$Id: Fl_Group.cxx,v 1.8.2.8.2.10 2002/02/13 03:55:10 easysw Exp $" // // Group widget for the Fast Light Tool Kit (FLTK). // @@ -212,7 +212,8 @@ int Fl_Group::handle(int event) { if (children()) { for (int j = i;;) { - if (send(child(j), event)) return 1; + if (child(j)->takesevents()) + if (send(child(j), event)) return 1; j++; if (j >= children()) j = 0; if (j == i) break; @@ -552,5 +553,5 @@ void Fl_Group::draw_outside_label(const Fl_Widget& w) const { } // -// End of "$Id: Fl_Group.cxx,v 1.8.2.8.2.9 2002/01/01 15:11:30 easysw Exp $". +// End of "$Id: Fl_Group.cxx,v 1.8.2.8.2.10 2002/02/13 03:55:10 easysw Exp $". // diff --git a/src/fl_file_dir.cxx b/src/fl_file_dir.cxx index 5b83bed22..2e780a296 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.5 2002/01/01 15:11:32 easysw Exp $" +// "$Id: fl_file_dir.cxx,v 1.1.2.6 2002/02/13 03:55:10 easysw Exp $" // // File chooser widget for the Fast Light Tool Kit (FLTK). // @@ -47,15 +47,31 @@ char* fl_file_chooser(const char* message, const char* pat, const char* fname) { static char retname[1024]; - if (!fname || !*fname) fname = "."; - if (!fc) { + if (!fname || !*fname) fname = "."; + fc = new Fl_File_Chooser(fname, pat, Fl_File_Chooser::CREATE, message); fc->callback(callback, 0); } else { + if (!fname || !*fname) { + if (fc->filter() != pat && (!pat || !fc->filter() || + strcmp(pat, fc->filter()))) { + // if pattern is different, remove name but leave old directory: + char* p = (char *)fc->value(); + const char* q = filename_name(p); + int i; + + if (q == NULL) i = 0; + else i = strlen(q); + + p[i] = 0; + } + } + else + fc->value(fname); + fc->type(Fl_File_Chooser::CREATE); fc->filter(pat); - fc->value(fname); fc->label(message); } @@ -103,5 +119,5 @@ char* fl_dir_chooser(const char* message, const char* fname) // -// End of "$Id: fl_file_dir.cxx,v 1.1.2.5 2002/01/01 15:11:32 easysw Exp $". +// End of "$Id: fl_file_dir.cxx,v 1.1.2.6 2002/02/13 03:55:10 easysw Exp $". // |
