Changeset 12978


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

(2.4x) "Tier name" in the inspector is editable by double clicking it

File:
1 edited

Legend:

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

    r12325 r12978  
    2424
    2525#import "InfoTrackersViewController.h"
    26 #import "NSApplicationAdditions.h"
    2726#import "Torrent.h"
    2827#import "TrackerCell.h"
     
    122121        NSAssert1([fTorrents count] == 1, @"Attempting to add tracker with %d transfers selected", [fTorrents count]);
    123122       
    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         }
     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];
    139135    }
    140136}
     
    187183    else
    188184        return [tableView rowHeight];
     185}
     186
     187- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
     188{
     189    return NO;
    189190}
    190191
Note: See TracChangeset for help on using the changeset viewer.