Ticket #429: sorting.2.diff
File sorting.2.diff, 2.4 KB (added by tiennou, 14 years ago) |
---|
-
macosx/Torrent.h
191 191 192 192 - (float) downloadRate; 193 193 - (float) uploadRate; 194 - (float) totalRate; 194 195 - (uint64_t) haveVerified; 195 196 - (uint64_t) haveTotal; 196 197 - (uint64_t) downloadedTotal; -
macosx/Torrent.m
1111 1111 return fStat->rateUpload; 1112 1112 } 1113 1113 1114 - (float) totalRate 1115 { 1116 return fStat->rateDownload + fStat->rateUpload; 1117 } 1118 1114 1119 - (uint64_t) haveVerified 1115 1120 { 1116 1121 return fStat->haveValid; … … 1472 1477 fDateCompleted = [dateCompleted retain]; 1473 1478 if (dateActivity) 1474 1479 fDateActivity = [dateActivity retain]; 1480 else 1481 fDateActivity = [fDateAdded copy]; 1475 1482 1476 1483 fRatioSetting = ratioSetting ? [ratioSetting intValue] : NSMixedState; 1477 1484 fRatioLimit = ratioLimit ? [ratioLimit floatValue] : [fDefaults floatForKey: @"RatioLimit"]; -
macosx/Controller.m
1632 1632 descriptors = [[NSArray alloc] initWithObjects: orderDescriptor, nil]; 1633 1633 else if ([sortType isEqualToString: SORT_ACTIVITY]) 1634 1634 { 1635 NSSortDescriptor * a ctivityDescriptor = [[[NSSortDescriptor alloc] initWithKey: @"dateActivityOrAdd" ascending: !asc]1636 1635 NSSortDescriptor * addedDescriptor = [[[NSSortDescriptor alloc] initWithKey: @"dateAdded" ascending: !asc] 1636 autorelease]; 1637 1637 1638 descriptors = [[NSArray alloc] initWithObjects: activityDescriptor, orderDescriptor, nil]; 1638 NSSortDescriptor * activityAmountDescriptor = [[[NSSortDescriptor alloc] initWithKey: @"totalRate" ascending: !asc] 1639 autorelease]; 1640 1641 NSSortDescriptor * stalledDescriptor = [[[NSSortDescriptor alloc] initWithKey: @"stalledMinutes" ascending: !asc] 1642 autorelease]; 1643 1644 descriptors = [[NSArray alloc] initWithObjects: activityAmountDescriptor, addedDescriptor, orderDescriptor, nil]; 1639 1645 } 1640 1646 else 1641 1647 {