#include "wx/cmndata.h"
-#include "Navigation.h"
+#ifdef __DARWIN__
+ #include <Carbon/Carbon.h>
+#else
+ #include <Navigation.h>
+#endif
#if !USE_SHARED_LIBRARY
IMPLEMENT_CLASS(wxDirDialog, wxDialog)
// flashing of the button when the key is hit
static pascal Boolean SFGetFolderModalDialogFilter(DialogPtr theDlgPtr, EventRecord *eventRec,
- short *item, Ptr dataPtr)
+ short *item, void *dataPtr)
{
#pragma unused (dataPtr)
// MyDlgHook is a hook routine that maps the select button to Open
// and sets the Select button name
-static pascal short SFGetFolderDialogHook(short item, DialogPtr theDlgPtr, Ptr dataPtr)
+static pascal short SFGetFolderDialogHook(short item, DialogPtr theDlgPtr, void *dataPtr)
{
UserDataRecPtr theUserDataRecPtr;
long desktopDirID;
}
}
-static pascal Boolean OnlyVisibleFoldersCustomFileFilter(CInfoPBPtr myCInfoPBPtr, Ptr dataPtr)
+static pascal Boolean OnlyVisibleFoldersCustomFileFilter(CInfoPBPtr myCInfoPBPtr, void *dataPtr)
{
#pragma unused (dataPtr)
Str255 prompt ;
Str255 path ;
+#if TARGET_CARBON
+ c2pstrcpy((StringPtr)prompt, m_message) ;
+#else
strcpy((char *)prompt, m_message) ;
c2pstr((char *)prompt ) ;
-
+#endif
+#if TARGET_CARBON
+ c2pstrcpy((StringPtr)path, m_path ) ;
+#else
strcpy((char *)path, m_path ) ;
c2pstr((char *)path ) ;
+#endif
StandardFileReply reply ;
FileFilterYDUPP invisiblesExcludedCustomFilterUPP = 0 ;
}
else
{
- m_path = wxMacFSSpec2UnixFilename( &reply.sfFile ) ;
+ m_path = wxMacFSSpec2MacFilename( &reply.sfFile ) ;
return wxID_OK ;
}
return wxID_CANCEL;
name, &outFileSpec);
// outFolderDirID = thePB.dirInfo.ioDrDirID;
- m_path = wxMacFSSpec2UnixFilename( &outFileSpec ) ;
+ m_path = wxMacFSSpec2MacFilename( &outFileSpec ) ;
return wxID_OK ;
}
return wxID_CANCEL;