From 7221382917ce840ecf37e9102445e5191dcff08d Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Sat, 16 Jan 2010 16:51:22 +0000 Subject: Checked in Manolo's 'diff.patch' mods from STR #2307 for building FLTK with 64bit on Snow Leopard. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7014 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Native_File_Chooser_MAC.H | 5 ++--- src/Fl_Native_File_Chooser_MAC.cxx | 21 ++++++++++++++++----- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/FL/Fl_Native_File_Chooser_MAC.H b/FL/Fl_Native_File_Chooser_MAC.H index 015e20d21..a127c184f 100644 --- a/FL/Fl_Native_File_Chooser_MAC.H +++ b/FL/Fl_Native_File_Chooser_MAC.H @@ -68,9 +68,9 @@ private: 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 @@ private: 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); diff --git a/src/Fl_Native_File_Chooser_MAC.cxx b/src/Fl_Native_File_Chooser_MAC.cxx index 28d689bb9..5110d5fbc 100644 --- a/src/Fl_Native_File_Chooser_MAC.cxx +++ b/src/Fl_Native_File_Chooser_MAC.cxx @@ -389,9 +389,10 @@ Fl_Native_File_Chooser::Fl_Native_File_Chooser(int val) { 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 @@ Fl_Native_File_Chooser::Fl_Native_File_Chooser(int val) { _directory = NULL; _preset_file = NULL; _errmsg = NULL; - _keepstate = kNavNormalState; } // DESTRUCTOR @@ -461,8 +461,8 @@ int Fl_Native_File_Chooser::show() { // Make sure fltk interface updates before posting our dialog Fl::flush(); - _keepstate = kNavNormalState; #ifndef __APPLE_COCOA__ + _keepstate = kNavNormalState; // BROWSER TITLE CFStringRef cfs_title; cfs_title = CFStringCreateWithCString(NULL, @@ -853,6 +853,9 @@ const char* Fl_Native_File_Chooser::preset_file() { #ifdef __APPLE_COCOA__ #import #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 @@ void Fl_Native_File_Chooser::type(int val) { } } -@interface FLopenDelegate : NSObject { +@interface FLopenDelegate : NSObject +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 + +#endif +{ NSPopUpButton *nspopup; char **filter_pattern; } @@ -910,7 +917,11 @@ void Fl_Native_File_Chooser::type(int val) { } @end -@interface FLsaveDelegate : NSObject { +@interface FLsaveDelegate : NSObject +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 + +#endif +{ } - (NSString *)panel:(id)sender userEnteredFilename:(NSString *)filename confirmed:(BOOL)okFlag; @end -- cgit v1.2.3