Changeset 697


Ignore:
Timestamp:
Jul 25, 2006, 2:12:18 AM (15 years ago)
Author:
livings124
Message:

When filtering transfers,the amount in the status bar shows how many transfers are actually visible and the total amount.

Location:
trunk/macosx
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.h

    r684 r697  
    100100
    101101- (NSArray *) torrentsAtIndexes: (NSIndexSet *) indexSet;
    102 - (void) torrentNumberChanged;
    103102
    104103- (void) resumeSelectedTorrents:    (id) sender;
  • trunk/macosx/Controller.m

    r686 r697  
    213213        }
    214214   
    215     [self torrentNumberChanged];
    216    
    217215    //set sort
    218216    fSortType = [[fDefaults stringForKey: @"Sort"] retain];
     
    494492    }
    495493
    496     [self torrentNumberChanged];
    497 
    498494    [self updateUI: nil];
    499495    [self applyFilter: nil];
     
    515511        return torrents;
    516512    }
    517 }
    518 
    519 - (void) torrentNumberChanged
    520 {
    521     int count = [fTorrents count];
    522     [fTotalTorrentsField setStringValue: [NSString stringWithFormat:
    523         @"%d Transfer%s", count, count == 1 ? "" : "s"]];
    524513}
    525514
     
    722711    }
    723712   
    724     [self torrentNumberChanged];
     713    [fTableView deselectAll: nil];
    725714   
    726715    [self updateUI: nil];
    727     [self setWindowSizeToFit];
    728    
    729     [fTableView deselectAll: nil];
     716    [self applyFilter: nil];
    730717   
    731718    [self updateTorrentHistory];
     
    10661053    NSMutableArray * tempTorrents = [[NSMutableArray alloc] initWithCapacity: [fTorrents count]];
    10671054
     1055    BOOL filtering = YES;
    10681056    if ([fFilterType isEqualToString: @"Pause"])
    10691057    {
     
    10911079    }
    10921080    else
     1081    {
     1082        filtering = NO;
    10931083        [tempTorrents setArray: fTorrents];
     1084    }
    10941085   
    10951086    NSString * searchString = [fSearchFilterField stringValue];
     
    11231114    }
    11241115   
     1116    //set status bar torrents
     1117    NSMutableString * totalTorrentsString = [NSMutableString stringWithString: @""];
     1118    if (filtering)
     1119        [totalTorrentsString appendFormat: @"%d/", [fFilteredTorrents count]];
     1120   
     1121    int totalCount = [fTorrents count];
     1122    [totalTorrentsString appendFormat: @"%d Transfer%s", totalCount, totalCount == 1 ? "" : "s"];
     1123   
     1124    [fTotalTorrentsField setStringValue: totalTorrentsString];
     1125
    11251126    [self setWindowSizeToFit];
    11261127}
  • trunk/macosx/English.lproj/MainMenu.nib/info.nib

    r693 r697  
    3030        <key>IBOldestOS</key>
    3131        <integer>3</integer>
     32        <key>IBOpenObjects</key>
     33        <array>
     34                <integer>21</integer>
     35        </array>
    3236        <key>IBSystem Version</key>
    3337        <string>8J135</string>
Note: See TracChangeset for help on using the changeset viewer.