1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 17:47:37 +00:00

#3017 fix the pieces bar for magnet links

This commit is contained in:
Mitchell Livingston 2010-03-07 02:46:49 +00:00
parent c83b9c5cb9
commit 5d4ecbcecf

View file

@ -571,6 +571,14 @@
{ {
Torrent * torrent = [self representedObject]; 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); NSInteger pieceCount = MIN([torrent pieceCount], MAX_PIECES);
float * piecesPercent = malloc(pieceCount * sizeof(float)); float * piecesPercent = malloc(pieceCount * sizeof(float));
[torrent getAmountFinished: piecesPercent size: pieceCount]; [torrent getAmountFinished: piecesPercent size: pieceCount];