1
0
Fork 0
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:
Mitchell Livingston 2008-03-29 23:55:10 +00:00
parent 1c25dca676
commit eb431b6d9a

View file

@ -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];