Revision: 12362
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12362&view=rev
Author: hofman
Date: 2008-01-08 08:53:23 -0800 (Tue, 08 Jan 2008)
Log Message:
-----------
Use finder icon if both webview and text icon fails.
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-08
16:15:45 UTC (rev 12361)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m 2008-01-08
16:53:23 UTC (rev 12362)
@@ -111,10 +111,14 @@
if (FVWebIconDisabled || (NO == [[aURL scheme] isEqualToString:@"http"] &&
NO == [aURL isFileURL])) {
NSZone *zone = [self zone];
[self release];
- if ([aURL isFileURL])
- self = [[FVTextIcon allocWithZone:zone] initWithTextAtURL:aURL];
- else
- self = [[FVFinderIcon allocWithZone:zone] initWithURLScheme:[aURL
scheme]];
+ if ([aURL isFileURL]) {
+ if ([FVTextIcon canInitWithURL:aURL])
+ self = [[FVTextIcon alloc] initWithTextAtURL:aURL];
+ else
+ self = [[FVFinderIcon alloc] initWithFinderIconOfURL:aURL];
+ } else {
+ self = [[FVFinderIcon alloc] initWithURLScheme:[aURL scheme]];
+ }
}
else if ((self = [super init])) {
_httpURL = [aURL copy];
@@ -449,10 +453,14 @@
[self
performSelectorOnMainThread:@selector(renderOffscreenOnMainThread)
withObject:nil waitUntilDone:NO];
}
else if (YES == _webviewFailed && nil == _fallbackIcon) {
- if ([_httpURL isFileURL])
- _fallbackIcon = [[FVTextIcon alloc] initWithTextAtURL:_httpURL];
- else
+ if ([_httpURL isFileURL]) {
+ if ([FVTextIcon canInitWithURL:_httpURL])
+ _fallbackIcon = [[FVTextIcon alloc]
initWithTextAtURL:_httpURL];
+ else
+ _fallbackIcon = [[FVFinderIcon alloc]
initWithFinderIconOfURL:_httpURL];
+ } else {
_fallbackIcon = [[FVFinderIcon alloc] initWithURLScheme:[_httpURL
scheme]];
+ }
}
pthread_mutex_unlock(&_mutex);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit