mirror of
https://github.com/transmission/transmission
synced 2025-02-20 21:26:53 +00:00
some cleanup of the blocklist code, and store the date of the last blocklist update
This commit is contained in:
parent
0401e5a83a
commit
8cf84293b5
2 changed files with 3 additions and 7 deletions
|
@ -91,7 +91,6 @@ BlocklistDownloader * fDownloader = nil;
|
|||
[fViewController setStatusProgressForCurrentSize: fCurrentSize expectedSize: fExpectedSize];
|
||||
}
|
||||
|
||||
#warning release?
|
||||
- (void) download: (NSURLDownload *) download didFailWithError: (NSError *) error
|
||||
{
|
||||
[fViewController setFailed: [error localizedDescription]];
|
||||
|
@ -147,7 +146,8 @@ BlocklistDownloader * fDownloader = nil;
|
|||
|
||||
[fViewController setFinished];
|
||||
|
||||
#warning update date
|
||||
[[NSUserDefaults standardUserDefaults] setObject: [NSDate date] forKey: @"BlocklistLastUpdate"];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName: @"BlocklistUpdated" object: nil];
|
||||
|
||||
[pool release];
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#import "BlocklistDownloader.h"
|
||||
#import "PrefsController.h"
|
||||
#import "NSStringAdditions.h"
|
||||
#import "NSApplicationAdditions.h"
|
||||
|
||||
@interface BlocklistDownloaderViewController (Private)
|
||||
|
||||
|
@ -82,7 +81,7 @@
|
|||
[fProgressBar setDoubleValue: (double)currentSize / expectedSize];
|
||||
}
|
||||
else
|
||||
string = [string stringByAppendingFormat: @" (%@)", [NSString stringForFileSize: expectedSize]];
|
||||
string = [string stringByAppendingFormat: @" (%@)", [NSString stringForFileSize: currentSize]];
|
||||
|
||||
[fTextField setStringValue: string];
|
||||
}
|
||||
|
@ -108,9 +107,6 @@
|
|||
|
||||
- (void) setFailed: (NSString *) error
|
||||
{
|
||||
#warning remove?
|
||||
//[fProgressBar setHidden: YES];
|
||||
|
||||
[NSApp endSheet: fStatusWindow];
|
||||
[fStatusWindow orderOut: self];
|
||||
|
||||
|
|
Loading…
Reference in a new issue