mirror of
https://github.com/transmission/transmission
synced 2025-02-20 13:16:53 +00:00
a little trivial cleanup
This commit is contained in:
parent
b46052826c
commit
68d355b497
2 changed files with 6 additions and 7 deletions
|
@ -621,7 +621,7 @@
|
|||
Torrent * torrent = [fTorrents objectAtIndex: 0];
|
||||
NSIndexSet * indexSet = [fFileOutline selectedRowIndexes];
|
||||
NSMutableIndexSet * itemIndexes = [NSMutableIndexSet indexSet];
|
||||
int i, index, state = (menuItem == fFileCheckItem) ? NSOnState : NSOffState;
|
||||
int i, state = (menuItem == fFileCheckItem) ? NSOnState : NSOffState;
|
||||
for (i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i])
|
||||
[itemIndexes addIndexes: [[fFileOutline itemAtRow: i] objectForKey: @"Indexes"]];
|
||||
|
||||
|
@ -636,7 +636,7 @@
|
|||
Torrent * torrent = [fTorrents objectAtIndex: 0];
|
||||
NSIndexSet * indexSet = [fFileOutline selectedRowIndexes];
|
||||
NSMutableIndexSet * itemIndexes = [NSMutableIndexSet indexSet];
|
||||
int i, index;
|
||||
int i;
|
||||
for (i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i])
|
||||
[itemIndexes addIndexes: [[fFileOutline itemAtRow: i] objectForKey: @"Indexes"]];
|
||||
|
||||
|
|
|
@ -1297,7 +1297,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
|||
else
|
||||
offState = YES;
|
||||
|
||||
if (onState == offState)
|
||||
if (onState && offState)
|
||||
return NSMixedState;
|
||||
}
|
||||
return onState ? NSOnState : NSOffState;
|
||||
|
@ -1404,10 +1404,9 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
|||
|
||||
NSDate * started = [NSDate dateWithTimeIntervalSince1970: start / 1000],
|
||||
* activity = [self dateActivity];
|
||||
if (!activity || [started compare: activity] == NSOrderedDescending)
|
||||
return -1 * [started timeIntervalSinceNow] / 60;
|
||||
else
|
||||
return -1 * [activity timeIntervalSinceNow] / 60;
|
||||
|
||||
NSDate * laterDate = !activity || [started compare: activity] == NSOrderedDescending ? started : activity;
|
||||
return -1 * [laterDate timeIntervalSinceNow] / 60;
|
||||
}
|
||||
|
||||
- (BOOL) isStalled
|
||||
|
|
Loading…
Reference in a new issue