DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2307
Version: 1.3-current





Link: http://www.fltk.org/str.php?L2307
Version: 1.3-current
Index: src/Fl_Native_File_Chooser_MAC.cxx
===================================================================
--- src/Fl_Native_File_Chooser_MAC.cxx  (revision 7011)
+++ src/Fl_Native_File_Chooser_MAC.cxx  (working copy)
@@ -389,9 +389,10 @@
   NavGetDefaultDialogCreationOptions(&_opts);
   _opts.optionFlags |= kNavDontConfirmReplacement;     // no confirms for 
"save as"
   _ref            = NULL;
+  _keepstate      = kNavNormalState;
+  memset(&_tempitem, 0, sizeof(_tempitem));
 #endif
   _options        = NO_OPTIONS;
-  memset(&_tempitem, 0, sizeof(_tempitem));
   _pathnames      = NULL;
   _tpathnames     = 0;
   _title          = NULL;
@@ -403,7 +404,6 @@
   _directory      = NULL;
   _preset_file    = NULL;
   _errmsg         = NULL;
-  _keepstate      = kNavNormalState;
 }
 
 // DESTRUCTOR
@@ -461,8 +461,8 @@
   // Make sure fltk interface updates before posting our dialog
   Fl::flush();
 
+#ifndef __APPLE_COCOA__
   _keepstate = kNavNormalState;
-#ifndef __APPLE_COCOA__
   // BROWSER TITLE
   CFStringRef cfs_title;
   cfs_title = CFStringCreateWithCString(NULL,
@@ -853,6 +853,9 @@
 #ifdef __APPLE_COCOA__
 #import <Cocoa/Cocoa.h>
 #define UNLIKELYPREFIX "___fl_very_unlikely_prefix_"
+#ifndef MAC_OS_X_VERSION_10_6
+#define MAC_OS_X_VERSION_10_6 1060
+#endif
 
 int Fl_Native_File_Chooser::get_saveas_basename(void) {
   char *q = strdup( [[(NSSavePanel*)_panel filename] fileSystemRepresentation] 
);
@@ -886,7 +889,11 @@
   }
 }
   
-...@interface FLopenDelegate : NSObject {
+...@interface FLopenDelegate : NSObject 
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+<NSOpenSavePanelDelegate>
+#endif
+{
   NSPopUpButton *nspopup;
   char **filter_pattern;
 }
@@ -910,7 +917,11 @@
 }
 @end
 
-...@interface FLsaveDelegate : NSObject {
+...@interface FLsaveDelegate : NSObject 
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+<NSOpenSavePanelDelegate>
+#endif
+{
 }
 - (NSString *)panel:(id)sender userEnteredFilename:(NSString *)filename 
confirmed:(BOOL)okFlag;
 @end
Index: FL/Fl_Native_File_Chooser_MAC.H
===================================================================
--- FL/Fl_Native_File_Chooser_MAC.H     (revision 7011)
+++ FL/Fl_Native_File_Chooser_MAC.H     (working copy)
@@ -68,9 +68,9 @@
   void                  *_panel;
 #else
   NavDialogRef    _ref;                        // file navigation reference
-#endif
   NavActionState  _keepstate;          // holds button permissions
   NavMenuItemSpec _tempitem;                   // Popup menu selection
+#endif
   char          **_pathnames;          // array of pathnames
   int             _tpathnames;         // total pathnames
   char           *_directory;          // default pathname to use
@@ -116,11 +116,10 @@
   int get_saveas_basename(void);
 #else
   int get_saveas_basename(NavDialogRef& ref);
-#endif
   int get_pathnames(NavDialogRef& ref);
   static void event_handler(NavEventCallbackMessage callBackSelector, 
                            NavCBRecPtr cbparm, void *data);
-
+#endif
   void clear_filters();
   void add_filter(const char *, const char *);
   void parse_filter(const char *from);
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to