trivial changes to sorting by state and other miscellaneous changes
This commit is contained in:
parent
a80b9c52eb
commit
e7fd11864e
|
@ -1787,7 +1787,7 @@ zijOSc5pzorOqs66ztvO+88czzzPXc99z57Pvs/fz+/QANAg0EHQYdCC0KLQw9Dj0PPRFNE00VXRddGW
|
|||
<object class="NSSortDescriptor" key="NSSortDescriptorPrototype">
|
||||
<string key="NSKey">Message</string>
|
||||
<bool key="NSAscending">YES</bool>
|
||||
<string key="NSSelector">localizedCaseInsensitiveCompare:</string>
|
||||
<string key="NSSelector">compareFinder:</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
|
|
@ -255,7 +255,7 @@ typedef enum
|
|||
- (int) stalledMinutes;
|
||||
- (BOOL) isStalled;
|
||||
|
||||
- (NSNumber *) stateSortKey;
|
||||
- (NSInteger) stateSortKey;
|
||||
|
||||
- (tr_torrent *) torrentStruct;
|
||||
|
||||
|
|
|
@ -1587,14 +1587,14 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
|||
return fStalled;
|
||||
}
|
||||
|
||||
- (NSNumber *) stateSortKey
|
||||
- (NSInteger) stateSortKey
|
||||
{
|
||||
if (![self isActive])
|
||||
return [NSNumber numberWithInt: 0];
|
||||
else if ([self isSeeding])
|
||||
return [NSNumber numberWithInt: 1];
|
||||
else
|
||||
return [NSNumber numberWithInt: 2];
|
||||
if (![self isActive]) //paused
|
||||
return 0;
|
||||
else if ([self isSeeding]) //seeding
|
||||
return 1;
|
||||
else //downloading
|
||||
return 2;
|
||||
}
|
||||
|
||||
- (tr_torrent *) torrentStruct
|
||||
|
|
|
@ -263,8 +263,7 @@
|
|||
|
||||
NSDictionary * userInfo = [NSDictionary dictionaryWithObject: [NSNumber numberWithInt: row] forKey: @"Row"];
|
||||
TorrentCell * cell = (TorrentCell *)[self preparedCellAtColumn: -1 row: row];
|
||||
[cell addTrackingAreasForView: self inRect: [self rectOfRow: row] withUserInfo: userInfo
|
||||
mouseLocation: mouseLocation];
|
||||
[cell addTrackingAreasForView: self inRect: [self rectOfRow: row] withUserInfo: userInfo mouseLocation: mouseLocation];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue