зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
877f157b1a
Коммит
d69d2b0310
|
@ -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]) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче