diff options
author | nyamatongwe <unknown> | 2011-09-09 16:59:38 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2011-09-09 16:59:38 +1000 |
commit | c4e2263b026a0b5aa67c421b767c3ebbabda654f (patch) | |
tree | a81b91816ba7a5b16ad676ba3a2776e99a3316af /cocoa/PlatCocoa.mm | |
parent | 9f1e13f587c8c3221a99cd2beee90242c32862fc (diff) | |
parent | 9b4a855ed7962ce5da8c3e538a38f3eb396a8cc7 (diff) | |
download | scintilla-mirror-c4e2263b026a0b5aa67c421b767c3ebbabda654f.tar.gz |
Merge with main repository.
Diffstat (limited to 'cocoa/PlatCocoa.mm')
-rw-r--r-- | cocoa/PlatCocoa.mm | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 9b4455237..ce112f853 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -1383,7 +1383,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; } @@ -1464,7 +1467,10 @@ public: class ListBoxImpl; @interface AutoCompletionDataSource : -NSObject <NSTableViewDataSource> +NSObject +#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 +<NSTableViewDataSource> +#endif { ListBoxImpl* box; } @@ -1841,7 +1847,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); @@ -1878,7 +1887,6 @@ NSImage* ListBoxImpl::ImageForRow(NSInteger row) if (it != images.end()) { NSImage* img = it->second; - [img retain]; return img; } else |