On 09/20/14 21:34,
crocher...@gmail.com wrote:
> To follow up on this idea of having the possibility to select either a file or a directory in the file chooser, here is a first patch to make it work... but only on the FLTK chooser. I was unable to make that working for Windows even with Greg's link (and I haven't look at Mac). So, as suggested, I made it as an OPTION of the Fl_Native_Chooser (OR_DIRECTORY) which is available for the types: Fl_Native_File_Chooser::BROWSE_FILE and Fl_Native_File_Chooser::BROWSE_MULTI_FILE. For the latest it's then possible to select multiple files, multiple directories or combination of both. The option has no effect on the Windows and Mac native choosers so far.
> Treating it as an option (as opposed as a new type) implied to now pass this option to the Fl_File_Chooser.
>
> And sorry, I'm not sure if it's the right place and the right format for the patch...
>
> |
> diff fltk-1.3.2_orig/FL/Fl_File_Chooser.H fltk-1.3.2/FL/Fl_File_Chooser.H
> 25d24
It's fine to ask here.. what is best:
FLTK CORE DISCUSSIONS
To /discuss/ patches to fltk, it's probably best to post them on fltk.coredev,
as that group is for discussing core development of the fltk library.
If you have a patch that you think is really ready for FLTK, and probably
won't need much discussion, then go straight for making an RFE
(Request For Enhancement) using the STR bug report page here:
http://www.fltk.org/str.php
..so that patches won't get lost in the noise of the forum.
(Just click on 'Submit Bug or Feature Request', and in the form
change the "Priority" to "Request for enhancement".)
PATCH FORMAT
When creating patches using diff(1), it's best to use 'diff -Naur', e.g.
diff -Naur FL/Fl_File_Chooser.H.orig FL/Fl_File_Chooser.H
..where the first file is the original, and the second is your mods.
This way + indicates added lines, and - indicates removed lines.
You can just redirect the output of that diff -Naur command to a
foo.patch file, and attach to either a forum post or the RFE forms.
By including it as an attachment, it ensures your mail program won't
word wrap the contents.
Or, if you checked out FLTK code from svn, you can just make your mods
directly to the fltk code, and then send us the output of 'svn diff', e.g.
svn diff FL/Fl_File_Chooser.H
..which provides a patch in 'diff -Naur' format for the file you modified
against the original checked out code. You can then redirect that output
to a file (e.g. foo.patch) and attach.
The 'diff -Naur' format is compatible with patch(1), so that the patch
can be applied to even evolving code. (The default behavior of diff(1)
doesn't use the easier to read +/- format, and isn't good for patch(1))