fixing the carbon cfm
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
1f919f38c8
commit
e996f50942
@ -923,9 +923,28 @@ wxString wxMacFSSpec2MacFilename( const FSSpec *spec )
|
|||||||
Str255 theParentPath = "\p";
|
Str255 theParentPath = "\p";
|
||||||
FSSpec theParentSpec;
|
FSSpec theParentSpec;
|
||||||
FSRef theParentRef;
|
FSRef theParentRef;
|
||||||
|
FSRef theRef ;
|
||||||
char theFileName[FILENAME_MAX];
|
char theFileName[FILENAME_MAX];
|
||||||
char thePath[FILENAME_MAX];
|
char thePath[FILENAME_MAX];
|
||||||
|
|
||||||
|
// we loose the long filename by merely copying the spec->name
|
||||||
|
// so try the built-ins, which only work if the file exists, but still...
|
||||||
|
|
||||||
|
theErr = FSpMakeFSRef(spec, &theRef);
|
||||||
|
if ( theErr == noErr )
|
||||||
|
{
|
||||||
|
CFURLRef fullURLRef;
|
||||||
|
fullURLRef = ::CFURLCreateFromFSRef(NULL, &theRef);
|
||||||
|
#ifdef __UNIX__
|
||||||
|
CFURLPathStyle pathstyle = kCFURLPOSIXPathStyle;
|
||||||
|
#else
|
||||||
|
CFURLPathStyle pathstyle = kCFURLHFSPathStyle;
|
||||||
|
#endif
|
||||||
|
CFStringRef cfString = CFURLCopyFileSystemPath(fullURLRef, pathstyle);
|
||||||
|
::CFRelease( fullURLRef ) ;
|
||||||
|
return wxMacCFStringHolder(cfString).AsString(wxFont::GetDefaultEncoding());
|
||||||
|
}
|
||||||
|
|
||||||
strcpy(thePath, "");
|
strcpy(thePath, "");
|
||||||
|
|
||||||
// GD: Separate file name from path and make a FSRef to the parent
|
// GD: Separate file name from path and make a FSRef to the parent
|
||||||
|
@ -1307,9 +1307,13 @@ OSStatus wxMacControl::SetData(ControlPartCode inPartCode , ResType inTag , Size
|
|||||||
|
|
||||||
OSStatus wxMacControl::SendEvent( EventRef event , OptionBits inOptions )
|
OSStatus wxMacControl::SendEvent( EventRef event , OptionBits inOptions )
|
||||||
{
|
{
|
||||||
|
#if TARGET_API_MAC_OSX
|
||||||
return SendEventToEventTargetWithOptions( event,
|
return SendEventToEventTargetWithOptions( event,
|
||||||
HIObjectGetEventTarget( (HIObjectRef) m_controlRef ),
|
HIObjectGetEventTarget( (HIObjectRef) m_controlRef ), inOptions );
|
||||||
inOptions );
|
#else
|
||||||
|
#pragma unused(inOptions)
|
||||||
|
return SendEventToEventTarget(event,GetControlEventTarget( m_controlRef ) ) ;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
OSStatus wxMacControl::SendHICommand( HICommand &command , OptionBits inOptions )
|
OSStatus wxMacControl::SendHICommand( HICommand &command , OptionBits inOptions )
|
||||||
|
Loading…
Reference in New Issue
Block a user