Changeset 5002


Ignore:
Timestamp:
Feb 10, 2008, 4:56:13 PM (14 years ago)
Author:
livings124
Message:

fix a problem with groups on 10.4

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r4984 r5002  
    17941794{
    17951795    //get all the torrents in the table
    1796     NSMutableArray * previousTorrents = [NSMutableArray array];
     1796    NSMutableArray * previousTorrents;
    17971797    if ([fDisplayedTorrents count] > 0 && ![[fDisplayedTorrents objectAtIndex: 0] isKindOfClass: [Torrent class]])
    17981798    {
     1799        previousTorrents = [NSMutableArray array];
     1800       
    17991801        NSEnumerator * enumerator = [fDisplayedTorrents objectEnumerator];
    18001802        NSDictionary * dict;
     
    18031805    }
    18041806    else
    1805         [previousTorrents setArray: fDisplayedTorrents];
     1807        previousTorrents = [NSMutableArray arrayWithArray: fDisplayedTorrents];
    18061808   
    18071809    NSArray * selectedValues = [fTableView selectedValues];
  • trunk/macosx/TorrentTableView.m

    r4974 r5002  
    6666        NSData * groupData = [fDefaults dataForKey: @"CollapsedGroups"];
    6767        if (groupData)
    68             fCollapsedGroups = [[NSUnarchiver unarchiveObjectWithData: groupData] retain];
     68            fCollapsedGroups = [[NSUnarchiver unarchiveObjectWithData: groupData] mutableCopy];
    6969        else
    7070            fCollapsedGroups = [[NSMutableIndexSet alloc] init];
     
    360360        else
    361361        {
    362             int group = [[item objectForKey: @"Group"] intValue], i;
     362            NSNumber * group = [item objectForKey: @"Group"];
     363            int i;
    363364            for (i = 0; i < [self numberOfRows]; i++)
    364365            {
    365366                id tableItem = [self itemAtRow: i];
    366                 if (![tableItem isKindOfClass: [Torrent class]] && [[tableItem objectForKey: @"Group"] intValue] == group)
     367                if (![tableItem isKindOfClass: [Torrent class]] && [group isEqualToNumber: [tableItem objectForKey: @"Group"]])
    367368                {
    368369                    [indexSet addIndex: i];
Note: See TracChangeset for help on using the changeset viewer.