From a662f88884d068ae4b07f6ed575f87e0f793b462 Mon Sep 17 00:00:00 2001 From: "pinkerton%aol.net" Date: Sun, 29 May 2005 18:12:57 +0000 Subject: [PATCH] fallback to the pasteboard string if we can't get the title string from the core pasteboard url drag flavor. (bug 294001) --- camino/src/extensions/NSPasteboard+Utils.mm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/camino/src/extensions/NSPasteboard+Utils.mm b/camino/src/extensions/NSPasteboard+Utils.mm index 8d77f4d217f2..4834fb4298a5 100644 --- a/camino/src/extensions/NSPasteboard+Utils.mm +++ b/camino/src/extensions/NSPasteboard+Utils.mm @@ -170,8 +170,13 @@ NSString* const kWebURLsWithTitlesPboardType = @"WebURLsWithTitlesPboardType"; } } else if ([types containsObject:NSURLPboardType]) { *outUrls = [NSArray arrayWithObject:[[NSURL URLFromPasteboard:self] absoluteString]]; - if ([types containsObject:kCorePasteboardFlavorType_urld]) - *outTitles = [NSArray arrayWithObject:[self stringForType:kCorePasteboardFlavorType_urld]]; + if ([types containsObject:kCorePasteboardFlavorType_urld]) { + NSString* title = [self stringForType:kCorePasteboardFlavorType_urld]; + if (!title) + title = [self stringForType:NSStringPboardType]; + if (title) + *outTitles = [NSArray arrayWithObject:title]; + } else *outTitles = [NSArray arrayWithObject:@""]; } else if ([types containsObject:NSStringPboardType]) {