]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/filedlg.cpp
Fixed compile errors, warnings and other DSMs, and improved comments.
[wxWidgets.git] / src / mac / filedlg.cpp
index 66e3c72b577b4344027fc075780e9c310d2abd2a..1d6fd58d44d32371f335a4b7fa0157b46cd6daa9 100644 (file)
@@ -20,7 +20,7 @@
 #include "wx/filedlg.h"
 #include "wx/intl.h"
 
-#if !defined(__UNIX__)
+#ifndef __DARWIN__
   #include "PLStringFuncs.h"
 #endif
 
@@ -30,13 +30,11 @@ IMPLEMENT_CLASS(wxFileDialog, wxDialog)
 
 // begin wxmac
 
-#if defined(__UNIX__)
-  #include <Carbon/Carbon.h>
-#else
+#ifndef __DARWIN__
   #include <Navigation.h>
 #endif
 
-#ifndef __UNIX__
+#ifndef __DARWIN__
   #include "morefile.h"
   #include "moreextr.h"
   #include "fullpath.h"
@@ -546,7 +544,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
 }
 
 
-Boolean CrossPlatformFilterCallback (
+pascal Boolean CrossPlatformFilterCallback (
     AEDesc *theItem, 
     void *info, 
     void *callBackUD, 
@@ -562,7 +560,11 @@ Boolean CrossPlatformFilterCallback (
                if (theItem->descriptorType == typeFSS && !theInfo->isFolder)
                {
                  FSSpec        spec;
-                 memcpy( &spec , *theItem->dataHandle , sizeof(FSSpec) ) ;
+#if TARGET_CARBON
+                 ::AEGetDescData(theItem, &spec, sizeof(FSSpec) ) ;
+#else
+                 memcpy( &spec , (*theItem->dataHandle) , sizeof(FSSpec) ) ;
+#endif
                  display = CheckFile( spec.name , theInfo->fileAndFolder.fileInfo.finderInfo.fdType , data ) ;
                }
        }
@@ -751,7 +753,7 @@ int wxFileDialog::ShowModal()
                  }
                }
 
-      mNavFilterUPP = NewNavObjectFilterProc( CrossPlatformFilterCallback ) ;
+      mNavFilterUPP = NewNavObjectFilterUPP( CrossPlatformFilterCallback ) ;
                        if ( m_dialogStyle & wxMULTIPLE )
                                mNavOptions.dialogOptionFlags |= kNavAllowMultipleFiles ;
                        else