eliminate the redundant isPaused, instead using !isActive

This commit is contained in:
Mitchell Livingston
2007-10-20 21:27:46 +00:00
parent 264f7ab8b3
commit a90c4a4b09
5 changed files with 12 additions and 20 deletions

View File

@@ -158,7 +158,7 @@
if ([torrent isActive])
[fController stopTorrents: [NSArray arrayWithObject: torrent]];
else if ([torrent isPaused])
else
{
if ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask)
[fController resumeTorrentsNoWait: [NSArray arrayWithObject: torrent]];
@@ -167,7 +167,6 @@
else
[fController resumeTorrents: [NSArray arrayWithObject: torrent]];
}
else;
}
else if (row == oldRow && [self pointInRevealRect: point] && [self pointInRevealRect: fClickPoint])
[[fTorrents objectAtIndex: row] revealData];
@@ -460,7 +459,7 @@
NSRect pauseRect = [self pauseRectForRow: row];
if ([torrent isActive])
pauseImage = fClickIn && NSPointInRect(fClickPoint, pauseRect) ? fPauseOnIcon : fPauseOffIcon;
else if ([torrent isPaused])
else
{
BOOL inPauseRect = fClickIn && NSPointInRect(fClickPoint, pauseRect);
if ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask && [fDefaults boolForKey: @"Queue"])
@@ -470,7 +469,6 @@
else
pauseImage = inPauseRect ? fResumeOnIcon : fResumeOffIcon;
}
else;
if (pauseImage)
[pauseImage compositeToPoint: NSMakePoint(pauseRect.origin.x, NSMaxY(pauseRect)) operation: NSCompositeSourceOver];