1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 01:27:28 +00:00

"Last updated: never" if there's no blocklist

This commit is contained in:
Mitchell Livingston 2008-09-01 04:04:00 +00:00
parent 05d35d6698
commit 34e2aa1b35
2 changed files with 48 additions and 19 deletions

View file

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

View file

@ -9,7 +9,6 @@
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="1361"/>
<integer value="66"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -2431,18 +2430,18 @@ AAABAAAAAQ</bytes>
<reference key="NSTextColor" ref="540507142"/>
</object>
</object>
<object class="NSTextField" id="148151843">
<object class="NSTextField" id="484538294">
<reference key="NSNextResponder" ref="538122014"/>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{131, 34}, {362, 14}}</string>
<reference key="NSSuperview" ref="538122014"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="782718396">
<object class="NSTextFieldCell" key="NSCell" id="520011795">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">272760832</int>
<string key="NSContents">Last updated: N/A</string>
<reference key="NSSupport" ref="26"/>
<reference key="NSControlView" ref="148151843"/>
<reference key="NSControlView" ref="484538294"/>
<reference key="NSBackgroundColor" ref="977951849"/>
<object class="NSColor" key="NSTextColor">
<int key="NSColorSpace">1</int>
@ -2563,6 +2562,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{497, 12}, {21, 23}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="893670578">
<int key="NSCellFlags">67239424</int>
@ -2586,6 +2586,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{42, 34}, {90, 17}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="514153614">
<int key="NSCellFlags">67239424</int>
@ -2602,6 +2603,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{135, 33}, {357, 18}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="127446013">
<int key="NSCellFlags">67239424</int>
@ -2625,6 +2627,7 @@ AAABAAAAAQ</bytes>
<object class="NSPSMatrix" key="NSDrawMatrix"/>
<string key="NSFrame">{{319, 279}, {16, 16}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<int key="NSpiFlags">28938</int>
<double key="NSMaxValue">1.000000e+02</double>
</object>
@ -2645,6 +2648,7 @@ AAABAAAAAQ</bytes>
</object>
<string key="NSFrame">{{320, 280}, {14, 14}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSImageCell" key="NSCell" id="270102740">
<int key="NSCellFlags">130560</int>
@ -2665,6 +2669,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{134, 279}, {124, 17}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="941628063">
<int key="NSCellFlags">67239424</int>
@ -2681,6 +2686,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{135, 255}, {171, 18}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="633401664">
<int key="NSCellFlags">67239424</int>
@ -2703,6 +2709,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{135, 200}, {271, 18}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="20752657">
<int key="NSCellFlags">67239424</int>
@ -2725,6 +2732,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{263, 277}, {50, 22}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="453443006">
<int key="NSCellFlags">-1804468671</int>
@ -2791,6 +2799,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{205, 145}, {50, 22}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1001442911">
<int key="NSCellFlags">-1804468671</int>
@ -2857,6 +2866,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{134, 239}, {238, 14}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="67017561">
<int key="NSCellFlags">67239424</int>
@ -2873,6 +2883,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{339, 279}, {179, 17}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="931894024">
<int key="NSCellFlags">67239424</int>
@ -2889,6 +2900,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{71, 280}, {61, 17}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="475516915">
<int key="NSCellFlags">67239424</int>
@ -2905,6 +2917,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{88, 201}, {44, 17}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="582281809">
<int key="NSCellFlags">67239424</int>
@ -2921,6 +2934,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{205, 171}, {259, 22}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1051431853">
<int key="NSCellFlags">-1804468671</int>
@ -2938,6 +2952,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{176, 73}, {68, 17}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="954130018">
<int key="NSCellFlags">67239424</int>
@ -2954,6 +2969,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{173, 99}, {71, 17}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="108838744">
<int key="NSCellFlags">67239424</int>
@ -2970,6 +2986,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{153, 173}, {47, 17}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="677732006">
<int key="NSCellFlags">67239424</int>
@ -2986,6 +3003,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{166, 147}, {34, 17}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="63707525">
<int key="NSCellFlags">67239424</int>
@ -3002,6 +3020,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{266, 147}, {60, 17}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="502542662">
<int key="NSCellFlags">67239424</int>
@ -3018,6 +3037,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{154, 123}, {187, 18}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="296153825">
<int key="NSCellFlags">67239424</int>
@ -3040,6 +3060,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{249, 71}, {184, 22}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSSecureTextFieldCell" key="NSCell" id="669471795">
<int key="NSCellFlags">343014976</int>
@ -3061,6 +3082,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{249, 97}, {184, 22}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="731460553">
<int key="NSCellFlags">-1804468671</int>
@ -3078,6 +3100,7 @@ AAABAAAAAQ</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{328, 141}, {99, 26}}</string>
<reference key="NSSuperview" ref="204700639"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="326179066">
<int key="NSCellFlags">-2076049856</int>
@ -3141,6 +3164,7 @@ AAABAAAAAQ</bytes>
</object>
<string key="NSFrameSize">{535, 319}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
<string key="NSExtension">NSResponder</string>
</object>
@ -6500,7 +6524,7 @@ AAABAAAAAQ</bytes>
<object class="IBOutletConnection" key="connection">
<string key="label">fBlocklistDateField</string>
<reference key="source" ref="511492310"/>
<reference key="destination" ref="148151843"/>
<reference key="destination" ref="484538294"/>
</object>
<int key="connectionID">1740</int>
</object>
@ -7883,7 +7907,7 @@ AAABAAAAAQ</bytes>
<reference ref="326257173"/>
<reference ref="826556979"/>
<reference ref="117148406"/>
<reference ref="148151843"/>
<reference ref="484538294"/>
</object>
<reference key="parent" ref="37013934"/>
<string key="objectName">Peers</string>
@ -8853,17 +8877,17 @@ AAABAAAAAQ</bytes>
</object>
<object class="IBObjectRecord">
<int key="objectID">1738</int>
<reference key="object" ref="148151843"/>
<reference key="object" ref="484538294"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="782718396"/>
<reference ref="520011795"/>
</object>
<reference key="parent" ref="538122014"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">1739</int>
<reference key="object" ref="782718396"/>
<reference key="parent" ref="148151843"/>
<reference key="object" ref="520011795"/>
<reference key="parent" ref="484538294"/>
</object>
</object>
</object>