The following patch for version 0.84 is probably the correct fix
which will allow the options() method to control the NEW_FOLDER
button for /all/ the chooser styles (open,save,etc).
I ran the test-browser app, and was able to make the "New Folder"
button appear/disappear based on the 'New Folder' option in the app
for all the browser types, so I'll make sure this patch gets in the
next release.
This also cleans up the code a bit, making it a 'magic patch'.
--- Fl_Native_File_Chooser_MAC.cxx 2007-09-30 00:13:00.000000000 -0700
+++ Fl_Native_File_Chooser_MAC.cxx.new 2007-11-21 09:58:31.000000000 -0800
@@ -540,10 +540,13 @@
_filt_value = 0; // TBD: move to someplace more logical?
}
+ if ( ! ( _options & NEW_FOLDER ) ) {
+ _keepstate |= kNavDontNewFolderState;
+ }
+
switch (_btype) {
case BROWSE_FILE:
case BROWSE_MULTI_FILE:
- //_keepstate = kNavDontNewFolderState;
// Prompt user for one or more files
if ((err = NavCreateGetFileDialog(
&_opts, // options
@@ -560,9 +563,6 @@
case BROWSE_DIRECTORY:
case BROWSE_MULTI_DIRECTORY:
- _keepstate = kNavDontNewFolderState;
- //FALLTHROUGH
-
case BROWSE_SAVE_DIRECTORY:
// Prompts user for one or more files or folders
if ((err = NavCreateChooseFolderDialog(
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk