1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 01:57:52 +00:00

#2503 When sorting by state, separate queued transfers from paused transfers

This commit is contained in:
Mitchell Livingston 2009-10-15 23:18:39 +00:00
parent bfc2e22834
commit 3877b7c1d3
2 changed files with 11 additions and 7 deletions

View file

@ -698,7 +698,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
[download cancel]; [download cancel];
[download release]; [download release];
} }
[fPendingTorrentDownloads removeAllObjects]; [fPendingTorrentDownloads release];
} }
//remember window states and close all windows //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]; [fBadger release];
[fAutoImportedNames release]; [fAutoImportedNames release];
[fPendingTorrentDownloads release];
[fPreviewPanel release]; [fPreviewPanel release];
@ -746,7 +745,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
NSAppleEventDescriptor * directObject = [event paramDescriptorForKeyword: keyDirectObject]; NSAppleEventDescriptor * directObject = [event paramDescriptorForKeyword: keyDirectObject];
if ([directObject descriptorType] == typeAEList) 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])) if ((urlString = [[directObject descriptorAtIndex: i] stringValue]))
break; break;
} }
@ -3196,7 +3195,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
NSRect frame = [fTableView iconRectForRow: row]; NSRect frame = [fTableView iconRectForRow: row];
if (!NSIntersectsRect([fTableView visibleRect], frame)) if (!NSIntersectsRect([fTableView visibleRect], frame))
return NSZeroRect; return NSZeroRect;
frame.origin = [fTableView convertPoint: frame.origin toView: nil]; frame.origin = [fTableView convertPoint: frame.origin toView: nil];
frame.origin = [fWindow convertBaseToScreen: frame.origin]; frame.origin = [fWindow convertBaseToScreen: frame.origin];

View file

@ -1471,11 +1471,16 @@ int trashDataFile(const char * filename)
- (NSInteger) stateSortKey - (NSInteger) stateSortKey
{ {
if (![self isActive]) //paused if (![self isActive]) //paused
return 0; {
if (fWaitToStart)
return 1;
else
return 0;
}
else if ([self isSeeding]) //seeding else if ([self isSeeding]) //seeding
return 1; return 10;
else //downloading else //downloading
return 2; return 20;
} }
- (NSString *) trackerSortKey - (NSString *) trackerSortKey