Revision: 12282
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12282&view=rev
Author: amaxwell
Date: 2008-01-05 10:57:59 -0800 (Sat, 05 Jan 2008)
Log Message:
-----------
Checking network connectivity is slow, so don't block other rendering
tasks while checking for it. Let WebKit try to load it, and then
handle the failure case via the normal mechanism.
Modified Paths:
--------------
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m 2008-01-05
18:57:48 UTC (rev 12281)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m 2008-01-05
18:57:59 UTC (rev 12282)
@@ -176,17 +176,6 @@
return needsRender;
}
-// this is intended to be a fast check to see if should try to use WebView
-- (BOOL)_canReachURL
-{
- BOOL reachable = NO;
- SCNetworkConnectionFlags flags;
-
- if (SCNetworkCheckReachabilityByName([[_httpURL host] UTF8String], &flags))
- reachable = !(flags & kSCNetworkFlagsConnectionRequired) && (flags &
kSCNetworkFlagsReachable);
- return reachable;
-}
-
- (CGImageRef)_createResampledImageOfSize:(NSSize)size
fromCGImage:(CGImageRef)largeImage;
{
CGFloat width = size.width;
@@ -400,10 +389,8 @@
return;
}
- // if we can't even reach the network, don't bother using the webview
// may have failed in one of the delegate methods, so we'll continue on
and load the fallback icon here
-
- if ([self _canReachURL] && NO == _webviewFailed && NO == _isRendering) {
+ if (NO == _webviewFailed && NO == _isRendering) {
// make sure needsRenderForSize: knows that we're actively rendering,
so renderOffscreen doesn't get called again
_isRendering = YES;
[self
performSelectorOnMainThread:@selector(renderOffscreenOnMainThread)
withObject:nil waitUntilDone:NO];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit