]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/filedlg.cpp
removed useless files
[wxWidgets.git] / src / mac / carbon / filedlg.cpp
index 66e3c72b577b4344027fc075780e9c310d2abd2a..504b2af6daba2af6b0cacac5a844b31adefd93ca 100644 (file)
@@ -20,7 +20,7 @@
 #include "wx/filedlg.h"
 #include "wx/intl.h"
 
-#if !defined(__UNIX__)
+#ifndef __DARWIN__
   #include "PLStringFuncs.h"
 #endif
 
@@ -30,18 +30,13 @@ IMPLEMENT_CLASS(wxFileDialog, wxDialog)
 
 // begin wxmac
 
-#if defined(__UNIX__)
-  #include <Carbon/Carbon.h>
-#else
+#ifndef __DARWIN__
   #include <Navigation.h>
 #endif
 
-#ifndef __UNIX__
-  #include "morefile.h"
-  #include "moreextr.h"
-  #include "fullpath.h"
-  #include "fspcompa.h"
-  #include "PLStringFuncs.h"
+#ifndef __DARWIN__
+  #include "MoreFiles.h"
+  #include "MoreFilesExtras.h"
 #endif
 
 extern bool gUseNavServices ;
@@ -546,7 +541,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
 }
 
 
-Boolean CrossPlatformFilterCallback (
+pascal Boolean CrossPlatformFilterCallback (
     AEDesc *theItem, 
     void *info, 
     void *callBackUD, 
@@ -562,7 +557,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 +750,7 @@ int wxFileDialog::ShowModal()
                  }
                }
 
-      mNavFilterUPP = NewNavObjectFilterProc( CrossPlatformFilterCallback ) ;
+      mNavFilterUPP = NewNavObjectFilterUPP( CrossPlatformFilterCallback ) ;
                        if ( m_dialogStyle & wxMULTIPLE )
                                mNavOptions.dialogOptionFlags |= kNavAllowMultipleFiles ;
                        else