Skip to content

Commit

Permalink
Put webPageURL in metadata as string rather than NSURL. #50
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeabdullah committed Oct 25, 2012
1 parent 356c58f commit ed47637
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion IMBFlickrNode.m
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ - (NSArray*) extractPhotosFromFlickrResponse: (NSDictionary*) response context:
NSMutableDictionary *metadata = [NSMutableDictionary dictionary];
[metadata addEntriesFromDictionary:photoDict]; // give metaData the whole thing!
NSURL *webPageURL = [context photoWebPageURLFromDictionary:photoDict];
[metadata setObject:webPageURL forKey:@"webPageURL"];
[metadata setObject:[webPageURL absoluteString] forKey:@"webPageURL"];

NSURL *quickLookURL = [self imageURLForDesiredSize:kIMBFlickrSizeSpecifierMedium fromPhotoDict:photoDict context:context];
[metadata setObject:quickLookURL forKey:@"quickLookURL"];
Expand Down
8 changes: 4 additions & 4 deletions IMBFlickrParser.m
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ - (IBAction) openFlickrPage: (id) sender {
id obj = [sender representedObject];
if ([obj isKindOfClass:[IMBObject class]]) {
IMBObject* imbObject = (IMBObject*) obj;
NSURL* webPage = [[imbObject metadata] objectForKey:@"webPageURL"];
[[NSWorkspace imb_threadSafeWorkspace] openURL:webPage];
NSString *webPage = [[imbObject metadata] objectForKey:@"webPageURL"];
[[NSWorkspace imb_threadSafeWorkspace] openURL:[NSURL URLWithString:webPage]];
} else {
NSLog (@"Can't handle this kind of object.");
}
Expand All @@ -178,12 +178,12 @@ - (IBAction) copyFlickrPageURL: (id) sender {
id obj = [sender representedObject];
if ([obj isKindOfClass:[IMBObject class]]) {
IMBObject* imbObject = (IMBObject*) obj;
NSURL* webPage = [[imbObject metadata] objectForKey:@"webPageURL"];
NSString *webPage = [[imbObject metadata] objectForKey:@"webPageURL"];

NSPasteboard *pb = [NSPasteboard generalPasteboard];
NSArray *types = [NSArray arrayWithObjects:NSStringPboardType, nil];
[pb declareTypes:types owner:self];
[pb setString:[webPage absoluteString] forType:NSStringPboardType];
[pb setString:webPage forType:NSStringPboardType];

} else {
NSLog (@"Can't handle this kind of object.");
Expand Down

0 comments on commit ed47637

Please sign in to comment.