git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42010
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
// Set default location for the modern Navigation APIs
// Apple Technical Q&A 1151
{
// Set default location for the modern Navigation APIs
// Apple Technical Q&A 1151
- FSSpec theFSSpec;
- wxMacFilename2FSSpec(data->GetPath(), &theFSSpec);
+ FSRef theFile;
+ wxMacPathToFSRef(data->GetPath(), &theFile);
AEDesc theLocation = { typeNull, NULL };
AEDesc theLocation = { typeNull, NULL };
- if (noErr == ::AECreateDesc(typeFSS, &theFSSpec, sizeof(FSSpec), &theLocation))
- ::NavCustomControl(ioParams->context, kNavCtlSetLocation, (void *) &theLocation);
+ if (noErr == ::AECreateDesc(typeFSRef, &theFile, sizeof(FSRef), &theLocation))
+ ::NavCustomControl(ioParams->context, kNavCtlSetLocation, (void *) &theLocation);
{
// Set default location for the modern Navigation APIs
// Apple Technical Q&A 1151
{
// Set default location for the modern Navigation APIs
// Apple Technical Q&A 1151
- FSSpec theFSSpec;
- wxMacFilename2FSSpec(data->defaultLocation, &theFSSpec);
+ FSRef theFile;
+ wxMacPathToFSRef(data->defaultLocation, &theFile);
AEDesc theLocation = { typeNull, NULL };
AEDesc theLocation = { typeNull, NULL };
- if (noErr == ::AECreateDesc(typeFSS, &theFSSpec, sizeof(FSSpec), &theLocation))
+ if (noErr == ::AECreateDesc(typeFSRef, &theFile, sizeof(FSRef), &theLocation))
::NavCustomControl(ioParams->context, kNavCtlSetLocation, (void *) &theLocation);
}
::NavCustomControl(ioParams->context, kNavCtlSetLocation, (void *) &theLocation);
}
NavFileOrFolderInfo* theInfo = (NavFileOrFolderInfo*) info ;
if ( !theInfo->isFolder )
{
NavFileOrFolderInfo* theInfo = (NavFileOrFolderInfo*) info ;
if ( !theInfo->isFolder )
{
- if (theItem->descriptorType == typeFSS)
+ AECoerceDesc (theItem, typeFSRef, theItem);
+
+ FSRef fsref ;
+ if ( AEGetDescData (theItem, &fsref, sizeof (FSRef)) == noErr )
- FSSpec spec;
- memcpy( &spec , *theItem->dataHandle , sizeof(FSSpec) ) ;
- wxString file = wxMacMakeStringFromPascal( spec.name ) ;
- display = CheckFile( file , theInfo->fileAndFolder.fileInfo.finderInfo.fdType , data ) ;
- }
- else if ( theItem->descriptorType == typeFSRef )
- {
- FSRef fsref ;
memcpy( &fsref , *theItem->dataHandle , sizeof(FSRef) ) ;
wxString file = wxMacFSRefToPath( &fsref ) ;
display = CheckFile( file , theInfo->fileAndFolder.fileInfo.finderInfo.fdType , data ) ;
memcpy( &fsref , *theItem->dataHandle , sizeof(FSRef) ) ;
wxString file = wxMacFSRefToPath( &fsref ) ;
display = CheckFile( file , theInfo->fileAndFolder.fileInfo.finderInfo.fdType , data ) ;
drawInfo.kind = kThemeBackgroundMetal;
HIThemeApplyBackground( &hiToolbarrect, &drawInfo, cgContext, kHIThemeOrientationNormal );
drawInfo.kind = kThemeBackgroundMetal;
HIThemeApplyBackground( &hiToolbarrect, &drawInfo, cgContext, kHIThemeOrientationNormal );
QDEndCGContext( (CGrafPtr) dc.m_macPort, &cgContext );
QDEndCGContext( (CGrafPtr) dc.m_macPort, &cgContext );