Changeset 2183


Ignore:
Timestamp:
Jun 22, 2007, 1:16:50 AM (15 years ago)
Author:
livings124
Message:

don't show priority colors for finished files

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/FileOutlineView.m

    r2149 r2183  
    7676    {
    7777        NSDictionary * item = [self itemAtRow: row];
    78         if ([[item objectForKey: @"IsFolder"] boolValue])
     78        if ([[item objectForKey: @"IsFolder"] boolValue]
     79                || ![[item objectForKey: @"Torrent"] canChangeDownloadCheckForFiles: [item objectForKey: @"Indexes"]])
    7980            [fNormalColor set];
    8081        else
     
    109110        {
    110111            item = [self itemAtRow: i];
    111             if (![[item objectForKey: @"IsFolder"] boolValue])
     112            if (![[item objectForKey: @"IsFolder"] boolValue]
     113                && [[item objectForKey: @"Torrent"] canChangeDownloadCheckForFiles: [item objectForKey: @"Indexes"]])
    112114            {
    113115                priority = [[item objectForKey: @"Priority"] intValue];
  • trunk/macosx/InfoWindowController.m

    r2181 r2183  
    910910    else if ([identifier isEqualToString: @"Priority"])
    911911    {
     912        if (![[fTorrents objectAtIndex: 0] canChangeDownloadCheckForFiles: [item objectForKey: @"Indexes"]])
     913            return;
     914       
    912915        int priority = [object intValue], actualPriority;
    913916        if (priority == 0)
  • trunk/macosx/Torrent.m

    r2172 r2183  
    14071407    int index;
    14081408    for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
    1409         if (priority == [[[fFlatFileList objectAtIndex: index] objectForKey: @"Priority"] intValue])
     1409        if (priority == [[[fFlatFileList objectAtIndex: index] objectForKey: @"Priority"] intValue]
     1410                && [self fileProgress: index] < 1.0)
    14101411            return YES;
    14111412    return NO;
     
    16791680            [dict setObject: [[NSWorkspace sharedWorkspace] iconForFileType: [name pathExtension]] forKey: @"Icon"];
    16801681            [dict setObject: [NSNumber numberWithInt: priority] forKey: @"Priority"];
     1682            [dict setObject: self forKey: @"Torrent"];
    16811683           
    16821684            [flatList addObject: dict];
Note: See TracChangeset for help on using the changeset viewer.