File chooser fix from Kurt Konolige.
Mousewheel event propagation fix for Fl_Group. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1958 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
af16ba7e8b
commit
ab0949c1f7
5
CHANGES
5
CHANGES
@ -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
|
||||
|
||||
@ -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 $".
|
||||
//
|
||||
|
||||
@ -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 $".
|
||||
//
|
||||
|
||||
Loading…
Reference in New Issue
Block a user