From 3aba37aa13fb5b0cce97def8f717271a2b522ab1 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sun, 28 Aug 2011 00:07:30 +0000 Subject: [PATCH] remove redundant code --- macosx/Controller.m | 2 -- macosx/Torrent.h | 1 + macosx/Torrent.m | 19 ++++++++----------- macosx/TorrentCell.m | 2 +- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index bafb81eb3..08192f4fe 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -4230,8 +4230,6 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy - (void) rpcUpdateQueue { - NSLog(@"rpcUpdateQueue"); - for (Torrent * torrent in fTorrents) [torrent update]; diff --git a/macosx/Torrent.h b/macosx/Torrent.h index 85ff8d6b0..466799a5a 100644 --- a/macosx/Torrent.h +++ b/macosx/Torrent.h @@ -75,6 +75,7 @@ - (void) update; +- (void) startTransferIgnoringQueue: (BOOL) ignoreQueue; - (void) startTransferNoQueue; - (void) startTransfer; - (void) stopTransfer; diff --git a/macosx/Torrent.m b/macosx/Torrent.m index dbad0a161..f297efed7 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -300,11 +300,11 @@ int trashDataFile(const char * filename) [self updateTimeMachineExclude]; } -- (void) startTransferNoQueue +- (void) startTransferIgnoringQueue: (BOOL) ignoreQueue { if ([self alertForRemainingDiskSpace]) { - tr_torrentStartNow(fHandle); + ignoreQueue ? tr_torrentStartNow(fHandle) : tr_torrentStart(fHandle); [self update]; //capture, specifically, stop-seeding settings changing to unlimited @@ -312,17 +312,14 @@ int trashDataFile(const char * filename) } } -#warning merge +- (void) startTransferNoQueue +{ + [self startTransferIgnoringQueue: YES]; +} + - (void) startTransfer { - if ([self alertForRemainingDiskSpace]) - { - tr_torrentStart(fHandle); - [self update]; - - //capture, specifically, stop-seeding settings changing to unlimited - [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateOptions" object: nil]; - } + [self startTransferIgnoringQueue: NO]; } - (void) stopTransfer diff --git a/macosx/TorrentCell.m b/macosx/TorrentCell.m index e5ffa39bc..cc6e81dae 100644 --- a/macosx/TorrentCell.m +++ b/macosx/TorrentCell.m @@ -469,7 +469,7 @@ #warning image should use new gear NSString * actionImageString; if (fMouseDownActionButton) - #warning we can get rid of the on 10.7 + #warning we can get rid of this on 10.7 actionImageString = @"ActionOn.png"; else if (!fTracking && fHoverAction) actionImageString = @"ActionHover.png";