]> granicus.if.org Git - transmission/commitdiff
If we have a url and string in the clipboard, only use the url when trying to open...
authorMitchell Livingston <livings124@transmissionbt.com>
Mon, 26 Dec 2011 02:46:27 +0000 (02:46 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Mon, 26 Dec 2011 02:46:27 +0000 (02:46 +0000)
macosx/TorrentTableView.m

index 02d416b7097ef0480a9a2d75c9a9d0c607d0bd83..64fa49240f18d6281a1d4902171bab35415fd29e 100644 (file)
     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)
             for (NSString * pbItem in items)
             {
                 for (NSTextCheckingResult * result in [detector matchesInString: pbItem options: 0 range: NSMakeRange(0, [pbItem length])])
-                {
                     [fController openURL: [[result URL] absoluteString]];
-                }
             }
         }
     }