diff --git a/macosx/PrefsController.m b/macosx/PrefsController.m index f6977146d..cbce069ee 100644 --- a/macosx/PrefsController.m +++ b/macosx/PrefsController.m @@ -480,19 +480,24 @@ tr_handle * fHandle; [fBlocklistEnableCheck setEnabled: exists]; [fBlocklistEnableCheck setState: exists && [fDefaults boolForKey: @"Blocklist"]]; - NSDate * updatedDate = [fDefaults objectForKey: @"BlocklistLastUpdate"]; NSString * updatedDateString; - if (updatedDate) + if (exists) { - NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init]; - [dateFormatter setDateStyle: NSDateFormatterFullStyle]; - [dateFormatter setTimeStyle: NSDateFormatterShortStyle]; - - updatedDateString = [dateFormatter stringFromDate: updatedDate]; - [dateFormatter release]; + NSDate * updatedDate = [fDefaults objectForKey: @"BlocklistLastUpdate"]; + if (updatedDate) + { + NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init]; + [dateFormatter setDateStyle: NSDateFormatterFullStyle]; + [dateFormatter setTimeStyle: NSDateFormatterShortStyle]; + + updatedDateString = [dateFormatter stringFromDate: updatedDate]; + [dateFormatter release]; + } + else + updatedDateString = NSLocalizedString(@"N/A", "Prefs -> blocklist -> message"); } else - updatedDateString = NSLocalizedString(@"N/A", "Prefs -> blocklist -> message"); + updatedDateString = NSLocalizedString(@"Never", "Prefs -> blocklist -> message"); [fBlocklistDateField setStringValue: [NSString stringWithFormat: @"%@: %@", NSLocalizedString(@"Last updated", "Prefs -> blocklist -> message"), updatedDateString]]; diff --git a/macosx/en.lproj/PrefsWindow.xib b/macosx/en.lproj/PrefsWindow.xib index 63ea3d1c3..19e0f68b6 100644 --- a/macosx/en.lproj/PrefsWindow.xib +++ b/macosx/en.lproj/PrefsWindow.xib @@ -9,7 +9,6 @@ YES - YES @@ -2431,18 +2430,18 @@ AAABAAAAAQ - + 256 {{131, 34}, {362, 14}} YES - + 67239424 272760832 Last updated: N/A - + 1 @@ -2563,6 +2562,7 @@ AAABAAAAAQ 256 {{497, 12}, {21, 23}} + YES 67239424 @@ -2586,6 +2586,7 @@ AAABAAAAAQ 256 {{42, 34}, {90, 17}} + YES 67239424 @@ -2602,6 +2603,7 @@ AAABAAAAAQ 256 {{135, 33}, {357, 18}} + YES 67239424 @@ -2625,6 +2627,7 @@ AAABAAAAAQ {{319, 279}, {16, 16}} + 28938 1.000000e+02 @@ -2645,6 +2648,7 @@ AAABAAAAAQ {{320, 280}, {14, 14}} + YES 130560 @@ -2665,6 +2669,7 @@ AAABAAAAAQ 256 {{134, 279}, {124, 17}} + YES 67239424 @@ -2681,6 +2686,7 @@ AAABAAAAAQ 256 {{135, 255}, {171, 18}} + YES 67239424 @@ -2703,6 +2709,7 @@ AAABAAAAAQ 256 {{135, 200}, {271, 18}} + YES 67239424 @@ -2725,6 +2732,7 @@ AAABAAAAAQ 256 {{263, 277}, {50, 22}} + YES -1804468671 @@ -2791,6 +2799,7 @@ AAABAAAAAQ 256 {{205, 145}, {50, 22}} + YES -1804468671 @@ -2857,6 +2866,7 @@ AAABAAAAAQ 256 {{134, 239}, {238, 14}} + YES 67239424 @@ -2873,6 +2883,7 @@ AAABAAAAAQ 256 {{339, 279}, {179, 17}} + YES 67239424 @@ -2889,6 +2900,7 @@ AAABAAAAAQ 256 {{71, 280}, {61, 17}} + YES 67239424 @@ -2905,6 +2917,7 @@ AAABAAAAAQ 256 {{88, 201}, {44, 17}} + YES 67239424 @@ -2921,6 +2934,7 @@ AAABAAAAAQ 256 {{205, 171}, {259, 22}} + YES -1804468671 @@ -2938,6 +2952,7 @@ AAABAAAAAQ 256 {{176, 73}, {68, 17}} + YES 67239424 @@ -2954,6 +2969,7 @@ AAABAAAAAQ 256 {{173, 99}, {71, 17}} + YES 67239424 @@ -2970,6 +2986,7 @@ AAABAAAAAQ 256 {{153, 173}, {47, 17}} + YES 67239424 @@ -2986,6 +3003,7 @@ AAABAAAAAQ 256 {{166, 147}, {34, 17}} + YES 67239424 @@ -3002,6 +3020,7 @@ AAABAAAAAQ 256 {{266, 147}, {60, 17}} + YES 67239424 @@ -3018,6 +3037,7 @@ AAABAAAAAQ 256 {{154, 123}, {187, 18}} + YES 67239424 @@ -3040,6 +3060,7 @@ AAABAAAAAQ 256 {{249, 71}, {184, 22}} + YES 343014976 @@ -3061,6 +3082,7 @@ AAABAAAAAQ 256 {{249, 97}, {184, 22}} + YES -1804468671 @@ -3078,6 +3100,7 @@ AAABAAAAAQ 256 {{328, 141}, {99, 26}} + YES -2076049856 @@ -3141,6 +3164,7 @@ AAABAAAAAQ {535, 319} + NSView NSResponder @@ -6500,7 +6524,7 @@ AAABAAAAAQ fBlocklistDateField - + 1740 @@ -7883,7 +7907,7 @@ AAABAAAAAQ - + Peers @@ -8853,17 +8877,17 @@ AAABAAAAAQ 1738 - + YES - + 1739 - - + +