Changeset 2318 for trunk/macosx/FileOutlineView.m
- Timestamp:
- Jul 10, 2007, 3:30:25 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/FileOutlineView.m
r2225 r2318 104 104 { 105 105 NSDictionary * item = [self itemAtRow: row]; 106 Torrent * torrent = [(InfoWindowController *)[[self window] windowController] selectedTorrent]; 107 106 108 if ([[item objectForKey: @"IsFolder"] boolValue] 107 || ![[(InfoWindowController *)[[self window] windowController] selectedTorrent] 108 canChangeDownloadCheckForFiles: [item objectForKey: @"Indexes"]]) 109 || ![torrent canChangeDownloadCheckForFiles: [item objectForKey: @"Indexes"]]) 109 110 [fNormalColor set]; 110 111 else 111 112 { 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]) 114 115 [fHighPriorityColor set]; 115 else if ( priority == PRIORITY_LOW)116 else if ([torrent hasFilePriority: TR_PRI_LOW forIndexes: indexSet]) 116 117 [fLowPriorityColor set]; 117 118 else … … 133 134 134 135 NSDictionary * item; 136 NSIndexSet * indexSet; 135 137 int i, priority; 136 138 Torrent * torrent = [(InfoWindowController *)[[self window] windowController] selectedTorrent]; … … 140 142 { 141 143 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]) 144 149 { 145 priority = [[item objectForKey: @"Priority"] intValue]; 146 if (priority == PRIORITY_HIGH) 150 if ([torrent hasFilePriority: TR_PRI_HIGH forIndexes: indexSet]) 147 151 [fHighPriorityColor set]; 148 else if ( priority == PRIORITY_LOW)152 else if ([torrent hasFilePriority: TR_PRI_LOW forIndexes: indexSet]) 149 153 [fLowPriorityColor set]; 150 154 else
Note: See TracChangeset
for help on using the changeset viewer.