X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4362c7052b045f2ae743057d0fe8a17e053894cd..80a779275ae04443c568dca919adb26cf6f5002c:/src/mac/carbon/mimetmac.cpp?ds=sidebyside diff --git a/src/mac/carbon/mimetmac.cpp b/src/mac/carbon/mimetmac.cpp index 4ee87964e6..9265887d3c 100644 --- a/src/mac/carbon/mimetmac.cpp +++ b/src/mac/carbon/mimetmac.cpp @@ -58,7 +58,7 @@ #include #endif - +#ifndef __LP64__ // START CODE SAMPLE FROM TECHNOTE 1002 (http://developer.apple.com/technotes/tn/tn1002.html) // IsRemoteVolume can be used to find out if the @@ -320,7 +320,7 @@ pascal OSErr FSpGetFullPath( const FSSpec *spec, return result; } - +#endif // // On the mac there are two ways to open a file - one is through apple events and the // finder, another is through mime types. @@ -459,6 +459,7 @@ wxString wxFileTypeImpl::GetCommand(const wxString& verb) const #else //carbon/classic implementation + wxString wxFileTypeImpl::GetCommand(const wxString& verb) const { wxASSERT_MSG( m_manager != NULL , wxT("Bad wxFileType") ); @@ -789,7 +790,9 @@ pascal OSStatus MoreProcGetProcessTypeSignature( infoRec.processInfoLength = sizeof(ProcessInfoRec); infoRec.processName = NULL; +#ifndef __LP64__ infoRec.processAppSpec = NULL; +#endif if ( pPSN == NULL ) { @@ -1311,7 +1314,6 @@ private: // ---------------------------------------------------------------------------- #define wxCFDATA_RELEASEBUFFER 1 -#define wxCFDATA_RETAINBUFFER 0 class wxCFData { @@ -1694,8 +1696,18 @@ wxFileType* wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo) if (status == noErr) { Str255 psCreatorName; +#ifndef __LP64__ FSSpec dummySpec; status = FindApplication(creator, false, psCreatorName, &dummySpec); +#else + FSRef fsref; + status = LSFindApplicationForInfo( creator, NULL, NULL, &fsref ,NULL); + HFSUniStr255 name; + status = FSGetCatalogInfo(&fsref, kFSCatInfoNone, NULL, &name, NULL, NULL); + CFStringRef str = FSCreateStringFromHFSUniStr( 0 , &name ); + CFStringGetPascalString(str, psCreatorName, 256, CFStringGetSystemEncoding()); + CFRelease( str ); +#endif if (status == noErr) {