diff --git a/macosx/Controller.m b/macosx/Controller.m index 9c3d8e0f9..dfa6d0a8b 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -698,7 +698,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy [download cancel]; [download release]; } - [fPendingTorrentDownloads removeAllObjects]; + [fPendingTorrentDownloads release]; } //remember window states and close all windows @@ -731,7 +731,6 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy [fBadger release]; [fAutoImportedNames release]; - [fPendingTorrentDownloads release]; [fPreviewPanel release]; @@ -746,7 +745,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy NSAppleEventDescriptor * directObject = [event paramDescriptorForKeyword: keyDirectObject]; if ([directObject descriptorType] == typeAEList) { - for (NSUInteger i = 1; i <= [directObject numberOfItems]; i++) + for (NSInteger i = 1; i <= [directObject numberOfItems]; i++) if ((urlString = [[directObject descriptorAtIndex: i] stringValue])) break; } @@ -3196,7 +3195,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy NSRect frame = [fTableView iconRectForRow: row]; if (!NSIntersectsRect([fTableView visibleRect], frame)) - return NSZeroRect; + return NSZeroRect; frame.origin = [fTableView convertPoint: frame.origin toView: nil]; frame.origin = [fWindow convertBaseToScreen: frame.origin]; diff --git a/macosx/Torrent.m b/macosx/Torrent.m index ad2bba175..07334b75b 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -1471,11 +1471,16 @@ int trashDataFile(const char * filename) - (NSInteger) stateSortKey { if (![self isActive]) //paused - return 0; + { + if (fWaitToStart) + return 1; + else + return 0; + } else if ([self isSeeding]) //seeding - return 1; + return 10; else //downloading - return 2; + return 20; } - (NSString *) trackerSortKey