when downloading the blocklist, show amounts instead of percent
This commit is contained in:
parent
ea14cc231e
commit
8b627d3792
|
@ -162,9 +162,10 @@
|
||||||
NSString * string = NSLocalizedString(@"Downloading blocklist", "Blocklist -> message");
|
NSString * string = NSLocalizedString(@"Downloading blocklist", "Blocklist -> message");
|
||||||
if (fExpectedSize != NSURLResponseUnknownLength)
|
if (fExpectedSize != NSURLResponseUnknownLength)
|
||||||
{
|
{
|
||||||
double progress = (double)fCurrentSize / fExpectedSize;
|
NSString * substring = [NSString stringWithFormat: NSLocalizedString(@"%@ of %@", "Blocklist -> message"),
|
||||||
string = [string stringByAppendingString: [NSString localizedStringWithFormat: @" (%.1f%%)", 100.0 * progress]];
|
[NSString stringForFileSize: fCurrentSize], [NSString stringForFileSize: fExpectedSize]];
|
||||||
[fProgressBar setDoubleValue: progress];
|
string = [string stringByAppendingFormat: @" (%@)", substring];
|
||||||
|
[fProgressBar setDoubleValue: (double)fCurrentSize / fExpectedSize];
|
||||||
}
|
}
|
||||||
|
|
||||||
[fTextField setStringValue: string];
|
[fTextField setStringValue: string];
|
||||||
|
|
Binary file not shown.
|
@ -927,7 +927,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void *
|
||||||
NSString * error;
|
NSString * error;
|
||||||
if (!(error = [NSString stringWithUTF8String: fStat->errorString])
|
if (!(error = [NSString stringWithUTF8String: fStat->errorString])
|
||||||
&& !(error = [NSString stringWithCString: fStat->errorString encoding: NSISOLatin1StringEncoding]))
|
&& !(error = [NSString stringWithCString: fStat->errorString encoding: NSISOLatin1StringEncoding]))
|
||||||
error = NSLocalizedString(@"(unreadable error)", "Torrent -> error string unreadable");
|
error = [NSString stringWithFormat: @"(%@)", NSLocalizedString(@"unreadable error", "Torrent -> error string unreadable")];
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue