mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
show progress while downloading the blocklist
This commit is contained in:
parent
1c25dca676
commit
eb431b6d9a
1 changed files with 5 additions and 4 deletions
|
@ -80,9 +80,9 @@
|
|||
fCurrentSize += length;
|
||||
|
||||
#warning factor for unknown size, combine 2 strings - make a single private method
|
||||
[fTextField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"Downloading blocklist (%d%%)", "Blocklist -> message"),
|
||||
100 * (fCurrentSize / fExpectedSize)]];
|
||||
[fProgressBar setDoubleValue: fCurrentSize / fExpectedSize];
|
||||
[fTextField setStringValue: [NSString stringWithFormat: NSLocalizedString(@"Downloading blocklist (%.1f%%)",
|
||||
"Blocklist -> message"), 100.0 * ((double)fCurrentSize / fExpectedSize)]];
|
||||
[fProgressBar setDoubleValue: (double)fCurrentSize / fExpectedSize];
|
||||
}
|
||||
|
||||
- (void) download: (NSURLDownload *) download didFailWithError: (NSError *) error
|
||||
|
@ -119,7 +119,8 @@
|
|||
[[NSFileManager defaultManager] removeItemAtPath: DESTINATION error: NULL];
|
||||
|
||||
[fPrefsController updateBlocklistFields];
|
||||
|
||||
|
||||
#warning update sheet to show 100%
|
||||
[NSApp endSheet: fStatusWindow];
|
||||
[fStatusWindow orderOut: self];
|
||||
[self release];
|
||||
|
|
Loading…
Reference in a new issue