Revision: 2646
http://skim-app.svn.sourceforge.net/skim-app/?rev=2646&view=rev
Author: hofman
Date: 2007-08-13 11:16:35 -0700 (Mon, 13 Aug 2007)
Log Message:
-----------
Check image and URL pboard types separately.
Modified Paths:
--------------
trunk/SKDocumentController.m
Modified: trunk/SKDocumentController.m
===================================================================
--- trunk/SKDocumentController.m 2007-08-13 17:00:14 UTC (rev 2645)
+++ trunk/SKDocumentController.m 2007-08-13 18:16:35 UTC (rev 2646)
@@ -139,10 +139,10 @@
- (id)openDocumentWithContentsOfPasteboard:(NSPasteboard *)pboard
error:(NSError **)outError {
// allow any filter services to convert to TIFF data if we can't get PDF
or PS directly
pboard = [NSPasteboard pasteboardByFilteringTypesInPasteboard:pboard];
- NSString *pboardType = [pboard availableTypeFromArray:[NSArray
arrayWithObjects:NSPDFPboardType, NSPostScriptPboardType, NSTIFFPboardType,
NSURLPboardType, SKWeblocFilePboardType, NSStringPboardType, nil]];
+ NSString *pboardType;
id document = nil;
- if ([pboardType isEqualToString:NSPDFPboardType] || [pboardType
isEqualToString:NSPostScriptPboardType] || [pboardType
isEqualToString:NSTIFFPboardType]) {
+ if (pboardType = [pboard availableTypeFromArray:[NSArray
arrayWithObjects:NSPDFPboardType, NSPostScriptPboardType, NSTIFFPboardType,
nil]]) {
NSData *data = [pboard dataForType:pboardType];
@@ -167,7 +167,7 @@
*outError = error;
}
- } else if ([pboardType isEqualToString:NSURLPboardType] || [pboardType
isEqualToString:SKWeblocFilePboardType] || [pboardType
isEqualToString:NSStringPboardType]) {
+ } else if (pboardType = [pboard availableTypeFromArray:[NSArray
arrayWithObjects:NSURLPboardType, SKWeblocFilePboardType, NSStringPboardType,
nil]]) {
NSURL *theURL = [NSURL URLFromPasteboardAnyType:pboard];
if ([theURL isFileURL]) {
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: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit