mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
If we have a url and string in the clipboard, only use the url when trying to open as a torrent file. This way we avoid opening the same URL twice
This commit is contained in:
parent
5339d25dca
commit
22a5e885ba
1 changed files with 1 additions and 4 deletions
|
@ -545,8 +545,7 @@
|
|||
NSURL * url;
|
||||
if ((url = [NSURL URLFromPasteboard: [NSPasteboard generalPasteboard]]))
|
||||
[fController openURL: [url absoluteString]];
|
||||
|
||||
if ([NSApp isOnLionOrBetter])
|
||||
else if ([NSApp isOnLionOrBetter])
|
||||
{
|
||||
NSArray * items = [[NSPasteboard generalPasteboard] readObjectsForClasses: [NSArray arrayWithObject: [NSString class]] options: nil];
|
||||
if (items)
|
||||
|
@ -555,9 +554,7 @@
|
|||
for (NSString * pbItem in items)
|
||||
{
|
||||
for (NSTextCheckingResult * result in [detector matchesInString: pbItem options: 0 range: NSMakeRange(0, [pbItem length])])
|
||||
{
|
||||
[fController openURL: [[result URL] absoluteString]];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue