Ignore:
Timestamp:
Jul 10, 2007, 3:30:25 AM (15 years ago)
Author:
livings124
Message:

compile with charles_ last set of changes...currently file selection doesn't apply

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/FileOutlineView.m

    r2225 r2318  
    104104    {
    105105        NSDictionary * item = [self itemAtRow: row];
     106        Torrent * torrent = [(InfoWindowController *)[[self window] windowController] selectedTorrent];
     107       
    106108        if ([[item objectForKey: @"IsFolder"] boolValue]
    107                 || ![[(InfoWindowController *)[[self window] windowController] selectedTorrent]
    108                         canChangeDownloadCheckForFiles: [item objectForKey: @"Indexes"]])
     109                || ![torrent canChangeDownloadCheckForFiles: [item objectForKey: @"Indexes"]])
    109110            [fNormalColor set];
    110111        else
    111112        {
    112             int priority = [[item objectForKey: @"Priority"] intValue];
    113             if (priority == PRIORITY_HIGH)
     113            NSIndexSet * indexSet = [item objectForKey: @"Indexes"];
     114            if ([torrent hasFilePriority: TR_PRI_HIGH forIndexes: indexSet])
    114115                [fHighPriorityColor set];
    115             else if (priority == PRIORITY_LOW)
     116            else if ([torrent hasFilePriority: TR_PRI_LOW forIndexes: indexSet])
    116117                [fLowPriorityColor set];
    117118            else
     
    133134
    134135    NSDictionary * item;
     136    NSIndexSet * indexSet;
    135137    int i, priority;
    136138    Torrent * torrent = [(InfoWindowController *)[[self window] windowController] selectedTorrent];
     
    140142        {
    141143            item = [self itemAtRow: i];
    142             if (![[item objectForKey: @"IsFolder"] boolValue]
    143                 && [torrent canChangeDownloadCheckForFiles: [item objectForKey: @"Indexes"]])
     144            if ([[item objectForKey: @"IsFolder"] boolValue])
     145                continue;
     146           
     147            indexSet = [item objectForKey: @"Indexes"];
     148            if ([torrent canChangeDownloadCheckForFiles: indexSet])
    144149            {
    145                 priority = [[item objectForKey: @"Priority"] intValue];
    146                 if (priority == PRIORITY_HIGH)
     150                if ([torrent hasFilePriority: TR_PRI_HIGH forIndexes: indexSet])
    147151                    [fHighPriorityColor set];
    148                 else if (priority == PRIORITY_LOW)
     152                else if ([torrent hasFilePriority: TR_PRI_LOW forIndexes: indexSet])
    149153                    [fLowPriorityColor set];
    150154                else
Note: See TracChangeset for help on using the changeset viewer.