Changeset 5630


Ignore:
Timestamp:
Apr 16, 2008, 12:32:07 PM (14 years ago)
Author:
livings124
Message:

experiment in improving calculation of the availability bar

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/PrefsController.m

    r5577 r5630  
    667667    }
    668668   
    669     //for network view make sure progress indicator hides itself
    670     if (view == fNetworkView && [fPortStatusImage image])
     669    //for network view make sure progress indicator hides itself (get around a Tiger bug)
     670    if (![NSApp isOnLeopardOrBetter] && view == fNetworkView && [fPortStatusImage image])
    671671        [fPortStatusProgress setDisplayedWhenStopped: NO];
    672672}
  • trunk/macosx/Torrent.m

    r5628 r5630  
    875875{
    876876    if (![self isSeeding])
    877         return -1;
     877        return TR_ETA_UNKNOWN;
    878878   
    879879    float uploadRate = [self uploadRate];
     
    888888}
    889889
    890 #warning when stats change, elliminate the use of size and make use of just the 2 fields
    891890- (float) notAvailableDesired
    892891{
    893     return (float)(fStat->leftUntilDone - fStat->desiredAvailable) / [self size];
     892    return 1.0 - (float)fStat->desiredAvailable / [self sizeLeft];
    894893}
    895894
  • trunk/macosx/TorrentCell.m

    r5586 r5630  
    678678                && [fDefaults boolForKey: @"DisplayProgressBarAvailable"])
    679679            {
    680                 int notAvailableWidth = MIN(ceil(barRect.size.width * [torrent notAvailableDesired]), rightWidth);
     680                int notAvailableWidth = ceil(rightWidth * [torrent notAvailableDesired]);
    681681                if (notAvailableWidth > 0)
    682682                {
Note: See TracChangeset for help on using the changeset viewer.