}
}
- //for network view make sure progress indicator hides itself
- if (view == fNetworkView && [fPortStatusImage image])
+ //for network view make sure progress indicator hides itself (get around a Tiger bug)
+ if (![NSApp isOnLeopardOrBetter] && view == fNetworkView && [fPortStatusImage image])
[fPortStatusProgress setDisplayedWhenStopped: NO];
}
- (int) etaRatio
{
if (![self isSeeding])
- return -1;
+ return TR_ETA_UNKNOWN;
float uploadRate = [self uploadRate];
if (uploadRate < 0.1)
return (float)MAX([self downloadedTotal], [self haveTotal]) * (stopRatio - ratio) / uploadRate / 1024.0;
}
-#warning when stats change, elliminate the use of size and make use of just the 2 fields
- (float) notAvailableDesired
{
- return (float)(fStat->leftUntilDone - fStat->desiredAvailable) / [self size];
+ return 1.0 - (float)fStat->desiredAvailable / [self sizeLeft];
}
- (BOOL) isActive
if ([torrent isActive] && ![torrent allDownloaded] && ![torrent isChecking]
&& [fDefaults boolForKey: @"DisplayProgressBarAvailable"])
{
- int notAvailableWidth = MIN(ceil(barRect.size.width * [torrent notAvailableDesired]), rightWidth);
+ int notAvailableWidth = ceil(rightWidth * [torrent notAvailableDesired]);
if (notAvailableWidth > 0)
{
rightWidth -= notAvailableWidth;