diff --git a/macosx/Controller.m b/macosx/Controller.m index 1046f1d7f..bfc63422b 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -536,12 +536,6 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi //save history [self updateTorrentHistory]; - //make sure torrents are closed - NSEnumerator * enumerator = [fTorrents objectEnumerator]; - Torrent * torrent; - while ((torrent = [enumerator nextObject])) - [torrent closeTorrent]; - [fDisplayedTorrents removeAllObjects]; [fTorrents removeAllObjects]; @@ -2228,7 +2222,7 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi [sortedTorrents insertObject: [movingTorrents objectAtIndex: i] atIndex: insertIndex + i]; [movingTorrents release]; - + //redo order values i = 0; for (i = 0; i < [sortedTorrents count]; i++) @@ -2326,6 +2320,7 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi { BOOL torrent = NO, accept = YES; + #warning replace ifs with switch //create an array of files that can be opened NSMutableArray * filesToOpen = [[NSMutableArray alloc] init]; NSArray * files = [pasteboard propertyListForType: NSFilenamesPboardType]; diff --git a/macosx/Torrent.h b/macosx/Torrent.h index a8de70297..17944914a 100644 --- a/macosx/Torrent.h +++ b/macosx/Torrent.h @@ -78,7 +78,6 @@ typedef enum - (NSDictionary *) history; -- (void) closeTorrent; - (void) closeRemoveTorrent; - (void) changeIncompleteDownloadFolder: (NSString *) folder; diff --git a/macosx/Torrent.m b/macosx/Torrent.m index be19fb5d2..229b4210c 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -169,16 +169,10 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void * [super dealloc]; } -- (void) closeTorrent -{ - tr_torrentClearStatusCallback(fHandle); - tr_torrentClose(fHandle); -} - - (void) closeRemoveTorrent { tr_torrentRemoveSaved(fHandle); - [self closeTorrent]; + tr_torrentClose(fHandle); } - (void) changeIncompleteDownloadFolder: (NSString *) folder diff --git a/macosx/TorrentCell.m b/macosx/TorrentCell.m index 19893cafd..5045a35c0 100644 --- a/macosx/TorrentCell.m +++ b/macosx/TorrentCell.m @@ -464,7 +464,6 @@ int i, h, index; float increment = (float)pieceCount / MAX_PIECES; NSColor * pieceColor; - BOOL change; for (i = 0; i < MAX_PIECES; i++) { index = i * increment;