#include "wx/filedlg.h"
#include "wx/intl.h"
-#if !defined(__UNIX__)
+#ifndef __DARWIN__
#include "PLStringFuncs.h"
#endif
// 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"
{
Str255 filename ;
PLstrcpy( filename , name ) ;
-
+ p2cstr( filename ) ;
+ wxString file(filename) ;
+ file.MakeUpper() ;
+
if ( data->numfilters > 0 )
{
- for( int j = 1 ; j <= filename[0] ; j++ )
- {
- filename[j] = toupper( filename[j] ) ;
- }
//for ( int i = 0 ; i < data->numfilters ; ++i )
int i = data->currentfilter ;
if ( data->extensions[i].Right(2) == ".*" )
if ( extension.GetChar(0) == '*' )
extension = extension.Mid(1) ;
- if ( filename[0] >= extension.Len() && extension == (char*) filename + 1 + filename[0] - extension.Len() )
+ if ( file.Len() >= extension.Len() && extension == file.Right(extension.Len() ) )
return true ;
}
return false ;
}
-Boolean CrossPlatformFilterCallback (
+pascal Boolean CrossPlatformFilterCallback (
AEDesc *theItem,
void *info,
void *callBackUD,
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 ) ;
}
}
}
}
- mNavFilterUPP = NewNavObjectFilterProc( CrossPlatformFilterCallback ) ;
+ mNavFilterUPP = NewNavObjectFilterUPP( CrossPlatformFilterCallback ) ;
if ( m_dialogStyle & wxMULTIPLE )
mNavOptions.dialogOptionFlags |= kNavAllowMultipleFiles ;
else