mirror of
https://github.com/transmission/transmission
synced 2025-02-03 04:53:27 +00:00
don't show priority colors for finished files
This commit is contained in:
parent
e087ac395a
commit
ab4a1cd2f7
3 changed files with 10 additions and 3 deletions
|
@ -75,7 +75,8 @@
|
|||
if (![self isRowSelected: row])
|
||||
{
|
||||
NSDictionary * item = [self itemAtRow: row];
|
||||
if ([[item objectForKey: @"IsFolder"] boolValue])
|
||||
if ([[item objectForKey: @"IsFolder"] boolValue]
|
||||
|| ![[item objectForKey: @"Torrent"] canChangeDownloadCheckForFiles: [item objectForKey: @"Indexes"]])
|
||||
[fNormalColor set];
|
||||
else
|
||||
{
|
||||
|
@ -108,7 +109,8 @@
|
|||
if ([self isRowSelected: i])
|
||||
{
|
||||
item = [self itemAtRow: i];
|
||||
if (![[item objectForKey: @"IsFolder"] boolValue])
|
||||
if (![[item objectForKey: @"IsFolder"] boolValue]
|
||||
&& [[item objectForKey: @"Torrent"] canChangeDownloadCheckForFiles: [item objectForKey: @"Indexes"]])
|
||||
{
|
||||
priority = [[item objectForKey: @"Priority"] intValue];
|
||||
if (priority == PRIORITY_HIGH)
|
||||
|
|
|
@ -909,6 +909,9 @@
|
|||
}
|
||||
else if ([identifier isEqualToString: @"Priority"])
|
||||
{
|
||||
if (![[fTorrents objectAtIndex: 0] canChangeDownloadCheckForFiles: [item objectForKey: @"Indexes"]])
|
||||
return;
|
||||
|
||||
int priority = [object intValue], actualPriority;
|
||||
if (priority == 0)
|
||||
actualPriority = PRIORITY_LOW;
|
||||
|
|
|
@ -1406,7 +1406,8 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
|||
{
|
||||
int index;
|
||||
for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
|
||||
if (priority == [[[fFlatFileList objectAtIndex: index] objectForKey: @"Priority"] intValue])
|
||||
if (priority == [[[fFlatFileList objectAtIndex: index] objectForKey: @"Priority"] intValue]
|
||||
&& [self fileProgress: index] < 1.0)
|
||||
return YES;
|
||||
return NO;
|
||||
}
|
||||
|
@ -1678,6 +1679,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
|||
[dict setObject: [NSNumber numberWithUnsignedLongLong: size] forKey: @"Size"];
|
||||
[dict setObject: [[NSWorkspace sharedWorkspace] iconForFileType: [name pathExtension]] forKey: @"Icon"];
|
||||
[dict setObject: [NSNumber numberWithInt: priority] forKey: @"Priority"];
|
||||
[dict setObject: self forKey: @"Torrent"];
|
||||
|
||||
[flatList addObject: dict];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue