Revision 2943d6d4 pithos-macos/PithosBrowserController.m

b/pithos-macos/PithosBrowserController.m
52 52
#import "ASIPithosContainer.h"
53 53
#import "ASIPithosObject.h"
54 54
#import "PithosUtilities.h"
55
#import "BytesSizeTransformer.h"
55
#import "UsingSizeTransformer.h"
56 56

  
57 57
@interface PithosBrowserCell : FileSystemBrowserCell {}
58 58
@end
......
120 120

  
121 121
- (void)dealloc {
122 122
    [[NSNotificationCenter defaultCenter] removeObserver:self];
123
    [refreshTimer invalidate];
124
    [refreshTimer release];
123 125
    [clipboardParentNode release];
124 126
    [clipboardNodes release];
125 127
    [draggedParentNode release];
......
150 152
}
151 153

  
152 154
- (void)resetContainers:(NSNotification *)notification {
155
    [refreshTimer invalidate];
156
    [refreshTimer release];
157
    
153 158
    rootNode = nil;
154 159
    [browser loadColumnZero];
155 160
    [containersNodeChildren removeAllObjects];
......
164 169
    [othersSharedNode refresh];
165 170
    
166 171
    [activityFacility reset];
172
    
173
    refreshTimer = [[NSTimer scheduledTimerWithTimeInterval:30 target:self selector:@selector(forceRefresh:) userInfo:self repeats:YES] retain];
167 174
}
168 175

  
169 176
- (void)windowDidLoad {
......
175 182
    activityFacility = [PithosActivityFacility defaultPithosActivityFacility];
176 183
    activityFacility.delegate = self;
177 184
    
178
    accountNode = [[PithosAccountNode alloc] init];
185
    self.accountNode = [[[PithosAccountNode alloc] init] autorelease];
179 186
    containersNode = [[PithosEmptyNode alloc] initWithDisplayName:@"CONTAINERS" icon:nil];
180 187
    containersNodeChildren = [[NSMutableArray alloc] init];
181 188
    sharedNode = [[PithosEmptyNode alloc] initWithDisplayName:@"SHARED" icon:nil];
......
2064 2071
    }
2065 2072
    
2066 2073
    if (!message)
2067
        message = [NSString stringWithFormat:@"%@ used", 
2068
                   [[[[BytesSizeTransformer alloc] init] autorelease] transformedValue: 
2069
                    [NSNumber numberWithUnsignedInteger:accountNode.pithosAccount.bytesUsed]]];
2074
        message = [[[[UsingSizeTransformer alloc] init] autorelease] transformedValue:accountNode.pithosAccount];
2070 2075
    [activityTextField setStringValue:message];
2071 2076
}
2072 2077

  

Also available in: Unified diff