Hello everyone,
I just recently started using fltk and it's been a very pleasant experience so
far.
I'm not quite sure where to put this, since it's not a bug but more a little
inconsistency:
fltk 1.3.x-r7513, in Fl_File_Chooser2.cxx, line 729, (in
Fl_File_Chooser::fileListCB), the callback for the file dialog is never called
*after* the user double-clicks an entry in the filelist, the dialog is only
hidden:
if (Fl::event_clicks()) {
..
if (_fl_filename_isdir_quick(pathname))
{
// Change directories...
directory(pathname);
..
}
else
{
// Hide the window - picked the file...
window->hide();
----> easy fix: callback needs to be called here
----> if(callback_) (*callback_)(this, data_);
}
}
With this fix, the behaviour when pushing the ok button and double-clicking a
file-list entry would be exactly the same (because the ok button callback,
cb_okButton_i in Fl_File_Chooser.cxx, calls the callback after hiding the
dialog) and it would make differentiating between the callback being called on
selection (dialog still visible) and called after ok/double-click (dialog
hidden) very easy.
Cheers everyone,
Gregor
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk