Only show ratio, not upload speed, when seeding in minimal mode and set to display alternate status string.
This commit is contained in:
parent
9f78ab4699
commit
1b5751b7dd
|
@ -1474,7 +1474,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
|
||||||
{
|
{
|
||||||
//only allow reordering of rows if sorting by order with no filter
|
//only allow reordering of rows if sorting by order with no filter
|
||||||
if ([fSortType isEqualToString: @"Order"] && [fFilterType isEqualToString: @"None"]
|
if ([fSortType isEqualToString: @"Order"] && [fFilterType isEqualToString: @"None"]
|
||||||
&& [[fSearchFilterField stringValue] isEqualToString: @""])
|
&& [[fSearchFilterField stringValue] length] == 0)
|
||||||
{
|
{
|
||||||
[pasteboard declareTypes: [NSArray arrayWithObject: TORRENT_TABLE_VIEW_DATA_TYPE] owner: self];
|
[pasteboard declareTypes: [NSArray arrayWithObject: TORRENT_TABLE_VIEW_DATA_TYPE] owner: self];
|
||||||
[pasteboard setData: [NSKeyedArchiver archivedDataWithRootObject: indexes]
|
[pasteboard setData: [NSKeyedArchiver archivedDataWithRootObject: indexes]
|
||||||
|
|
|
@ -256,8 +256,13 @@
|
||||||
[fShortStatusString setString: @""];
|
[fShortStatusString setString: @""];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
[fShortStatusString setString: [NSString stringWithFormat: @"Ratio: %@, ",
|
{
|
||||||
[NSString stringForRatioWithDownload: [self downloadedTotal] upload: [self uploadedTotal]]]];
|
NSString * ratioString = [NSString stringForRatioWithDownload: [self downloadedTotal]
|
||||||
|
upload: [self uploadedTotal]];
|
||||||
|
|
||||||
|
[fShortStatusString setString: [NSString stringWithFormat: @"Ratio: %@, ", ratioString]];
|
||||||
|
[fRemainingTimeString setString: [@"Ratio: " stringByAppendingString: ratioString]];
|
||||||
|
}
|
||||||
|
|
||||||
stringToAppend = [stringToAppend stringByAppendingString: [@"UL: " stringByAppendingString:
|
stringToAppend = [stringToAppend stringByAppendingString: [@"UL: " stringByAppendingString:
|
||||||
[NSString stringForSpeed: [self uploadRate]]]];
|
[NSString stringForSpeed: [self uploadRate]]]];
|
||||||
|
|
|
@ -363,8 +363,8 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||||
//name and status string
|
//name and status string
|
||||||
float mainWidth = cellFrame.size.width - iconSize.width - 3.0 * PADDING - EXTRA_NAME_SHIFT;
|
float mainWidth = cellFrame.size.width - iconSize.width - 3.0 * PADDING - EXTRA_NAME_SHIFT;
|
||||||
|
|
||||||
NSString * realStatusString = !fStatusRegular && [fTorrent isActive] && [fTorrent progress] < 1.0
|
NSString * realStatusString = !fStatusRegular && [fTorrent isActive] ? [fTorrent remainingTimeString]
|
||||||
? [fTorrent remainingTimeString] : [fTorrent shortStatusString];
|
: [fTorrent shortStatusString];
|
||||||
|
|
||||||
NSAttributedString * statusString = [[[NSAttributedString alloc] initWithString: realStatusString
|
NSAttributedString * statusString = [[[NSAttributedString alloc] initWithString: realStatusString
|
||||||
attributes: statusAttributes] autorelease];
|
attributes: statusAttributes] autorelease];
|
||||||
|
|
|
@ -293,7 +293,7 @@
|
||||||
|
|
||||||
Torrent * torrent = [fTorrents objectAtIndex: row];
|
Torrent * torrent = [fTorrents objectAtIndex: row];
|
||||||
NSString * statusString = ![fDefaults boolForKey: @"SmallStatusRegular"] && [torrent isActive]
|
NSString * statusString = ![fDefaults boolForKey: @"SmallStatusRegular"] && [torrent isActive]
|
||||||
&& [torrent progress] < 1.0 ? [torrent remainingTimeString] : [torrent shortStatusString];
|
? [torrent remainingTimeString] : [torrent shortStatusString];
|
||||||
|
|
||||||
float statusWidth = [statusString sizeWithAttributes: fSmallStatusAttributes].width + 3.0;
|
float statusWidth = [statusString sizeWithAttributes: fSmallStatusAttributes].width + 3.0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue