diff options
author | nyamatongwe <nyamatongwe@gmail.com> | 2011-08-20 10:00:50 +1000 |
---|---|---|
committer | nyamatongwe <nyamatongwe@gmail.com> | 2011-08-20 10:00:50 +1000 |
commit | 502fe6953ebc27dde3622ea9fa8313364c412217 (patch) | |
tree | 35a34177d64ec776620e43e0d7ad3303d8224ecf | |
parent | fafcffad2b74f045990f025fba5ce25d7db91812 (diff) | |
download | scintilla-mirror-502fe6953ebc27dde3622ea9fa8313364c412217.tar.gz |
Replace call available only on 10.6 with sequence that works on 10.5.
-rw-r--r-- | cocoa/PlatCocoa.mm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 75803e33b..e2e2915f5 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -1378,7 +1378,10 @@ static NSImage* ImageFromXPM(XPM* pxpm) img = [NSImage alloc]; [img autorelease]; CGImageRef imageRef = surfaceIXPM->GetImage(); - [img initWithCGImage:imageRef size:NSZeroSize]; + [img initWithSize:NSZeroSize]; + NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithCGImage: imageRef]; + [img addRepresentation: bitmapRep]; + [bitmapRep release]; CGImageRelease(imageRef); delete surfaceXPM; } @@ -1836,7 +1839,10 @@ void ListBoxImpl::RegisterRGBAImage(int type, int width, int height, const unsig [img autorelease]; CGImageRef imageRef = ImageFromRGBA(width, height, pixelsImage, false); NSSize sz = {width, height}; - [img initWithCGImage:imageRef size:sz]; + [img initWithSize: sz]; + NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithCGImage: imageRef]; + [img addRepresentation: bitmapRep]; + [bitmapRep release]; CGImageRelease(imageRef); [img retain]; ImageMap::iterator it=images.find(type); |