Changeset 13145


Ignore:
Timestamp:
Jan 8, 2012, 5:04:30 PM (10 years ago)
Author:
livings124
Message:

dead code removal

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r13144 r13145  
    22622262            [fTableView beginUpdates];
    22632263       
    2264 #if 1
    22652264        //since we're not doing this the right way (boo buggy animation), we need to remember selected group
    22662265        NSArray * selectedValues = [fTableView selectedValues];
     
    22752274       
    22762275        [fTableView selectValues: selectedValues];
    2277 #else
    2278         #warning hard hat zone
    2279        
    2280         #warning use and don't modify all torrents?
    2281         NSMutableIndexSet * addIndexes = [NSMutableIndexSet indexSet];
    2282        
    2283         const NSUInteger groupCount = [fDisplayedTorrents count];
    2284         for (NSUInteger groupIndex = 0; groupIndex < groupCount; ++groupIndex)
    2285         {
    2286             TorrentGroup * group = [fDisplayedTorrents objectAtIndex: groupIndex];
    2287            
    2288             for (NSInteger indexInGroup = [[group torrents] count]-1; indexInGroup >= 0; --indexInGroup)
    2289             {
    2290                 Torrent * torrent = [[group torrents] objectAtIndex: indexInGroup];
    2291                
    2292                 #warning maybe keep some sort of index set? idk - don't modify allTorrents?
    2293                 const NSUInteger indexInAll = [allTorrents indexOfObject: torrent];
    2294                 if (indexInAll != NSNotFound)
    2295                 {
    2296                     [allTorrents removeObjectAtIndex: indexInAll];
    2297                     [[group torrents] removeObjectAtIndex: indexInGroup];
    2298                     [fDisplayedTorrents addObject: torrent];
    2299                     if (onLion)
    2300                         [fTableView moveItemAtIndex: indexInGroup inParent: group toIndex: [fDisplayedTorrents count]-1 inParent: nil];
    2301                 }
    2302             }
    2303         }
    2304        
    2305         NSIndexSet * groupIndexes = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, groupCount)];
    2306         [fDisplayedTorrents removeObjectsAtIndexes: groupIndexes];
    2307         if (onLion)
    2308             [fTableView removeItemsAtIndexes: groupIndexes inParent: nil withAnimation: NSTableViewAnimationSlideDown];
    2309        
    2310         if ([allTorrents count] > 0)
    2311         {
    2312             [fDisplayedTorrents addObjectsFromArray: allTorrents];
    2313             if (onLion)
    2314                 [fTableView insertItemsAtIndexes: [NSIndexSet indexSetWithIndexesInRange: NSMakeRange([fDisplayedTorrents count] - [allTorrents count], [allTorrents count])] inParent: nil withAnimation: NSTableViewAnimationSlideDown];
    2315         }
    2316 #endif
    23172276    }
    23182277    else if (groupRows && !wasGroupRows)
Note: See TracChangeset for help on using the changeset viewer.