Revision: 18497
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=18497&view=rev
Author: amaxwell
Date: 2012-02-08 14:42:51 +0000 (Wed, 08 Feb 2012)
Log Message:
-----------
apply workaround for icon size to missing file icon
Modified Paths:
--------------
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFinderIcon.m
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFinderIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFinderIcon.m 2012-02-08
07:35:05 UTC (rev 18496)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFinderIcon.m 2012-02-08
14:42:51 UTC (rev 18497)
@@ -319,12 +319,21 @@
rect = CGRectInset(rect, rect.size.width/4, rect.size.height/4);
if (questionIcon) PlotIconRefInContext(context, &rect,
kAlignCenterBottom, kTransformNone, NULL, kIconServicesNoBadgeFlag,
questionIcon);
- _thumbnail = CGBitmapContextCreateImage(context);
+ _thumbnail = CGBitmapContextCreateImage(context);
- context = [[FVBitmapContext
bitmapContextWithSize:NSMakeSize(FVMaxImageDimension, FVMaxImageDimension)]
graphicsPort];
+ size_t dim = FVMaxImageDimension;
+ /*
+ Crash under _ISGetCGImageRefForISImageRef as of 10.7.3. This seems
to avoid the crash,
+ but I've no idea if it's a truly good workaround. Apply to all
10.7.x systems for now.
+ rdar://problem/10809538
+ */
+ if (floor(NSAppKitVersionNumber) >= 1138)
+ dim = 200;
+
+ context = [[FVBitmapContext bitmapContextWithSize:NSMakeSize(dim,
dim)] graphicsPort];
rect = CGRectZero;
- rect.size = CGSizeMake(FVMaxImageDimension, FVMaxImageDimension);
+ rect.size = CGSizeMake(dim, dim);
CGContextClearRect(context, rect);
if (docIcon) PlotIconRefInContext(context, &rect,
kAlignAbsoluteCenter, kTransformNone, NULL, kIconServicesNoBadgeFlag, docIcon);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit