Skip to content

Commit

Permalink
Don't need long-winded method for reading pasteboard including weblocs.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeabdullah committed Nov 2, 2010
1 parent af949f5 commit d3d3c3a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
2 changes: 0 additions & 2 deletions KSWebLocationPasteboardUtilities.h
Expand Up @@ -55,6 +55,4 @@

@interface NSPasteboard (KSWebLocation)
- (NSArray *)readWebLocations;
- (NSArray *)readWebLocationsConvertingWeblocFiles:(BOOL)convertWeblocs
ignoreFileURLs:(BOOL)ignoreFileURLs;
@end
37 changes: 0 additions & 37 deletions KSWebLocationPasteboardUtilities.m
Expand Up @@ -293,42 +293,5 @@ - (NSArray *)readWebLocations;
return result;
}

- (NSArray *)readWebLocationsConvertingWeblocFiles:(BOOL)convertWeblocs
ignoreFileURLs:(BOOL)ignoreFileURLs;
{
// Get the unfiltered URLs
NSArray *result = [self readWebLocations];


if (convertWeblocs || ignoreFileURLs)
{
NSMutableArray *buffer = [[NSMutableArray alloc] initWithCapacity:[result count]];
KSWebLocation *aWebLocation;

for (aWebLocation in result)
{
// Convert .webloc files as required
NSURL *URL = [aWebLocation URL];
if (convertWeblocs && [URL isFileURL] && [[URL ks_pathExtension] isEqualToString:@"webloc"])
{
aWebLocation = [KSWebLocation webLocationWithContentsOfWeblocFile:URL];
}

// Add the URL to the list unless we've been requested to ignore file URLs
if (!(ignoreFileURLs && [[aWebLocation URL] isFileURL]))
{
[buffer addObject:aWebLocation];
}
}

result = [[buffer copy] autorelease];
[buffer release];
}


// Return
return result;
}

@end

0 comments on commit d3d3c3a

Please sign in to comment.