Revision cb6abe72 pithos-macos/UsingSizeTransformer.m
b/pithos-macos/UsingSizeTransformer.m | ||
---|---|---|
54 | 54 |
return @"Using -"; |
55 | 55 |
ASIPithosAccount *account = (ASIPithosAccount *)value; |
56 | 56 |
long long policyQuota = (account.policy ? [[account.policy objectForKey:@"quota"] longLongValue] : 0); |
57 |
BytesSizeTransformer *bytesSizeTransformer = [[[BytesSizeTransformer alloc] init] autorelease];
|
|
57 |
BytesSizeTransformer *bytesSizeTransformer = [[BytesSizeTransformer alloc] init];
|
|
58 | 58 |
if (policyQuota > 0) |
59 | 59 |
return [NSString stringWithFormat:@"Using %@ of %@", |
60 | 60 |
[bytesSizeTransformer transformedValue:[NSNumber numberWithUnsignedInteger:account.bytesUsed]], |
... | ... | |
65 | 65 |
} |
66 | 66 |
|
67 | 67 |
+ (void)initialize { |
68 |
[[self class] setValueTransformer:[[self new] autorelease] forName:@"UsingSizeTransformer"];
|
|
68 |
[[self class] setValueTransformer:[self new] forName:@"UsingSizeTransformer"];
|
|
69 | 69 |
} |
70 | 70 |
|
71 | 71 |
@end |
Also available in: Unified diff