From cd857d4bb8ba7b711675b06eeb65c86cf70419e9 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Wed, 2 Jan 2008 04:31:51 +0000 Subject: [PATCH] always allow "resume selected right away" to be selected, even if there are no queues enabled --- macosx/Controller.m | 3 --- macosx/TorrentTableView.m | 12 +++++------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index 7258e111f..8fa2c0f55 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -3404,9 +3404,6 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi //enable resume selected waiting item if (action == @selector(resumeSelectedTorrentsNoWait:)) { - if (![fDefaults boolForKey: @"Queue"] && ![fDefaults boolForKey: @"QueueSeed"]) - return NO; - NSEnumerator * enumerator = [[fDisplayedTorrents objectsAtIndexes: [fTableView selectedRowIndexes]] objectEnumerator]; Torrent * torrent; while ((torrent = [enumerator nextObject])) diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index 5a0fed269..c54fec782 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -487,15 +487,14 @@ Torrent * torrent = [fTorrents objectAtIndex: row]; //pause/resume icon - NSImage * pauseImage = nil; + NSImage * pauseImage; NSRect pauseRect = [self pauseRectForRow: row]; + BOOL inPauseRect = fClickIn && NSPointInRect(fClickPoint, pauseRect); if ([torrent isActive]) - pauseImage = fClickIn && NSPointInRect(fClickPoint, pauseRect) ? [NSImage imageNamed: @"PauseOn.png"] - : [NSImage imageNamed: @"PauseOff.png"]; + pauseImage = inPauseRect ? [NSImage imageNamed: @"PauseOn.png"] : [NSImage imageNamed: @"PauseOff.png"]; else { - BOOL inPauseRect = fClickIn && NSPointInRect(fClickPoint, pauseRect); - if ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask && [fDefaults boolForKey: @"Queue"]) + if ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask) pauseImage = inPauseRect ? [NSImage imageNamed: @"ResumeNoWaitOn.png"] : [NSImage imageNamed: @"ResumeNoWaitOff.png"]; else if ([torrent waitingToStart]) pauseImage = inPauseRect ? [NSImage imageNamed: @"PauseOn.png"] : [NSImage imageNamed: @"PauseOff.png"]; @@ -503,8 +502,7 @@ pauseImage = inPauseRect ? [NSImage imageNamed: @"ResumeOn.png"] : [NSImage imageNamed: @"ResumeOff.png"]; } - if (pauseImage) - [pauseImage compositeToPoint: NSMakePoint(pauseRect.origin.x, NSMaxY(pauseRect)) operation: NSCompositeSourceOver]; + [pauseImage compositeToPoint: NSMakePoint(pauseRect.origin.x, NSMaxY(pauseRect)) operation: NSCompositeSourceOver]; //reveal icon NSRect revealRect = [self revealRectForRow: row];