fallback to the pasteboard string if we can't get the title string from the

core pasteboard url drag flavor. (bug 294001)
This commit is contained in:
pinkerton%aol.net 2005-05-29 18:12:57 +00:00
Родитель 47608aa319
Коммит a662f88884
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -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]) {