Changeset 12979 for branches


Ignore:
Timestamp:
Oct 12, 2011, 3:40:54 AM (10 years ago)
Author:
livings124
Message:

(2.4x) revert accidental change in r12978

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4x/macosx/InfoTrackersViewController.m

    r12978 r12979  
    2424
    2525#import "InfoTrackersViewController.h"
     26#import "NSApplicationAdditions.h"
    2627#import "Torrent.h"
    2728#import "TrackerCell.h"
     
    121122        NSAssert1([fTorrents count] == 1, @"Attempting to add tracker with %d transfers selected", [fTorrents count]);
    122123       
    123         NSIndexSet * addedIndexes = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange([fTrackers count]-2, 2)];
    124         NSArray * tierAndTrackerBeingAdded = [fTrackers objectsAtIndexes: addedIndexes];
    125        
    126         [fTrackers release];
    127         fTrackers = [[[fTorrents objectAtIndex: 0] allTrackerStats] retain];
    128         [fTrackers addObjectsFromArray: tierAndTrackerBeingAdded];
    129        
    130         [fTrackerTable setTrackers: fTrackers];
    131        
    132         NSIndexSet * updateIndexes = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [fTrackers count]-2)],
    133                 * columnIndexes = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [[fTrackerTable tableColumns] count])];
    134         [fTrackerTable reloadDataForRowIndexes: updateIndexes columnIndexes: columnIndexes];
     124        if ([NSApp isOnSnowLeopardOrBetter])
     125        {
     126            NSIndexSet * addedIndexes = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange([fTrackers count]-2, 2)];
     127            NSArray * tierAndTrackerBeingAdded = [fTrackers objectsAtIndexes: addedIndexes];
     128           
     129            [fTrackers release];
     130            fTrackers = [[[fTorrents objectAtIndex: 0] allTrackerStats] retain];
     131            [fTrackers addObjectsFromArray: tierAndTrackerBeingAdded];
     132           
     133            [fTrackerTable setTrackers: fTrackers];
     134           
     135            NSIndexSet * updateIndexes = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [fTrackers count]-2)],
     136                    * columnIndexes = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [[fTrackerTable tableColumns] count])];
     137            [fTrackerTable reloadDataForRowIndexes: updateIndexes columnIndexes: columnIndexes];
     138        }
    135139    }
    136140}
Note: See TracChangeset for help on using the changeset viewer.