Changeset 13118


Ignore:
Timestamp:
Dec 26, 2011, 2:46:27 AM (9 years ago)
Author:
livings124
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/TorrentTableView.m

    r13117 r13118  
    546546    if ((url = [NSURL URLFromPasteboard: [NSPasteboard generalPasteboard]]))
    547547        [fController openURL: [url absoluteString]];
    548    
    549     if ([NSApp isOnLionOrBetter])
     548    else if ([NSApp isOnLionOrBetter])
    550549    {
    551550        NSArray * items = [[NSPasteboard generalPasteboard] readObjectsForClasses: [NSArray arrayWithObject: [NSString class]] options: nil];
     
    556555            {
    557556                for (NSTextCheckingResult * result in [detector matchesInString: pbItem options: 0 range: NSMakeRange(0, [pbItem length])])
    558                 {
    559557                    [fController openURL: [[result URL] absoluteString]];
    560                 }
    561558            }
    562559        }
Note: See TracChangeset for help on using the changeset viewer.