]> granicus.if.org Git - transmission/commitdiff
#3017 fix the pieces bar for magnet links
authorMitchell Livingston <livings124@transmissionbt.com>
Sun, 7 Mar 2010 02:46:49 +0000 (02:46 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Sun, 7 Mar 2010 02:46:49 +0000 (02:46 +0000)
macosx/TorrentCell.m

index 9a7c404fd75dc9a5f1c6fd899ee38537f2fa53df..b1f8af11409909d503bf214a8bd48c61893e319d 100644 (file)
 {
     Torrent * torrent = [self representedObject];
     
+    //fill an all-white bar for magnet links
+    if ([torrent isMagnet])
+    {
+        [[NSColor whiteColor] set];
+        NSRectFill(barRect);
+        return;
+    }
+    
     NSInteger pieceCount = MIN([torrent pieceCount], MAX_PIECES);
     float * piecesPercent = malloc(pieceCount * sizeof(float));
     [torrent getAmountFinished: piecesPercent size: pieceCount];