Revision cb6abe72

b/pithos-macos.xcodeproj/project.pbxproj
13 13
		610DD30613E6BB2000ED982F /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 610DD30413E6BB2000ED982F /* Credits.rtf */; };
14 14
		610DD30913E6BB2000ED982F /* pithos_macosAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD30813E6BB2000ED982F /* pithos_macosAppDelegate.m */; };
15 15
		610DD30C13E6BB2000ED982F /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 610DD30A13E6BB2000ED982F /* MainMenu.xib */; };
16
		610DD33E13E6BD8B00ED982F /* ASIDataCompressor.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD32013E6BD8B00ED982F /* ASIDataCompressor.m */; };
17
		610DD33F13E6BD8B00ED982F /* ASIDataDecompressor.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD32213E6BD8B00ED982F /* ASIDataDecompressor.m */; };
18
		610DD34013E6BD8B00ED982F /* ASIDownloadCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD32413E6BD8B00ED982F /* ASIDownloadCache.m */; };
19
		610DD34113E6BD8B00ED982F /* ASIFormDataRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD32613E6BD8B00ED982F /* ASIFormDataRequest.m */; };
20
		610DD34213E6BD8B00ED982F /* ASIHTTPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD32813E6BD8B00ED982F /* ASIHTTPRequest.m */; };
21
		610DD34313E6BD8B00ED982F /* ASIInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD32C13E6BD8B00ED982F /* ASIInputStream.m */; };
22
		610DD34413E6BD8B00ED982F /* ASINetworkQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD32E13E6BD8B00ED982F /* ASINetworkQueue.m */; };
23
		610DD34513E6BD8B00ED982F /* ASIPithosAccountRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD33213E6BD8B00ED982F /* ASIPithosAccountRequest.m */; };
24
		610DD34613E6BD8B00ED982F /* ASIPithosContainer.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD33413E6BD8B00ED982F /* ASIPithosContainer.m */; };
25
		610DD34713E6BD8B00ED982F /* ASIPithosContainerRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD33613E6BD8B00ED982F /* ASIPithosContainerRequest.m */; };
26
		610DD34813E6BD8B00ED982F /* ASIPithosObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD33813E6BD8B00ED982F /* ASIPithosObject.m */; };
27
		610DD34913E6BD8B00ED982F /* ASIPithosObjectRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD33A13E6BD8B00ED982F /* ASIPithosObjectRequest.m */; };
28
		610DD34A13E6BD8B00ED982F /* ASIPithosRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD33C13E6BD8B00ED982F /* ASIPithosRequest.m */; };
16
		610DD33E13E6BD8B00ED982F /* ASIDataCompressor.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD32013E6BD8B00ED982F /* ASIDataCompressor.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
17
		610DD33F13E6BD8B00ED982F /* ASIDataDecompressor.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD32213E6BD8B00ED982F /* ASIDataDecompressor.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
18
		610DD34013E6BD8B00ED982F /* ASIDownloadCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD32413E6BD8B00ED982F /* ASIDownloadCache.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
19
		610DD34113E6BD8B00ED982F /* ASIFormDataRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD32613E6BD8B00ED982F /* ASIFormDataRequest.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
20
		610DD34213E6BD8B00ED982F /* ASIHTTPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD32813E6BD8B00ED982F /* ASIHTTPRequest.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
21
		610DD34313E6BD8B00ED982F /* ASIInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD32C13E6BD8B00ED982F /* ASIInputStream.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
22
		610DD34413E6BD8B00ED982F /* ASINetworkQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD32E13E6BD8B00ED982F /* ASINetworkQueue.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
23
		610DD34513E6BD8B00ED982F /* ASIPithosAccountRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD33213E6BD8B00ED982F /* ASIPithosAccountRequest.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
24
		610DD34613E6BD8B00ED982F /* ASIPithosContainer.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD33413E6BD8B00ED982F /* ASIPithosContainer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
25
		610DD34713E6BD8B00ED982F /* ASIPithosContainerRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD33613E6BD8B00ED982F /* ASIPithosContainerRequest.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
26
		610DD34813E6BD8B00ED982F /* ASIPithosObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD33813E6BD8B00ED982F /* ASIPithosObject.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
27
		610DD34913E6BD8B00ED982F /* ASIPithosObjectRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD33A13E6BD8B00ED982F /* ASIPithosObjectRequest.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
28
		610DD34A13E6BD8B00ED982F /* ASIPithosRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD33C13E6BD8B00ED982F /* ASIPithosRequest.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
29 29
		610DD34E13E6BEF400ED982F /* PithosBrowserController.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD34D13E6BEF400ED982F /* PithosBrowserController.m */; };
30 30
		610DD35013E6C00E00ED982F /* PithosBrowserController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 610DD34F13E6C00E00ED982F /* PithosBrowserController.xib */; };
31 31
		610DD35413E6C09100ED982F /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 610DD35313E6C09100ED982F /* CoreServices.framework */; };
......
44 44
		613629B9143E51E000363787 /* GroupAndGroupMemberFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 613629B8143E51E000363787 /* GroupAndGroupMemberFormatter.m */; };
45 45
		6139837113EFEECC004CE444 /* FileSystemBrowserCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6139837013EFEECC004CE444 /* FileSystemBrowserCell.m */; };
46 46
		613BA8631461520E00FACAA5 /* NonEmptyStringFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 613BA8621461520E00FACAA5 /* NonEmptyStringFormatter.m */; };
47
		614299A914CEF0E7008D973A /* ASIPithos.m in Sources */ = {isa = PBXBuildFile; fileRef = 614299A814CEF0E7008D973A /* ASIPithos.m */; };
47
		614299A914CEF0E7008D973A /* ASIPithos.m in Sources */ = {isa = PBXBuildFile; fileRef = 614299A814CEF0E7008D973A /* ASIPithos.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
48 48
		61433BC9141BA1CE00CD978D /* HashMapHash.m in Sources */ = {isa = PBXBuildFile; fileRef = 61433BC8141BA1CE00CD978D /* HashMapHash.m */; };
49
		614592BC1417CE70002E7A8C /* ASIPithosAccount.m in Sources */ = {isa = PBXBuildFile; fileRef = 614592BB1417CE70002E7A8C /* ASIPithosAccount.m */; };
49
		614592BC1417CE70002E7A8C /* ASIPithosAccount.m in Sources */ = {isa = PBXBuildFile; fileRef = 614592BB1417CE70002E7A8C /* ASIPithosAccount.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
50 50
		614EEC8414E16EB5009DEFCC /* PithosAccount.m in Sources */ = {isa = PBXBuildFile; fileRef = 614EEC8314E16EB5009DEFCC /* PithosAccount.m */; };
51 51
		6152D08C143200CC00803874 /* PithosSharingAccountsNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 6152D08B143200CC00803874 /* PithosSharingAccountsNode.m */; };
52 52
		6152D092143334CC00803874 /* AllowedToBoolTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 6152D091143334CC00803874 /* AllowedToBoolTransformer.m */; };
......
79 79
		61F040F31448547000A0C788 /* FileMD5Hash.c in Sources */ = {isa = PBXBuildFile; fileRef = 61F040F11448547000A0C788 /* FileMD5Hash.c */; };
80 80
		61F04132144DB97200A0C788 /* PithosLocalObjectState.m in Sources */ = {isa = PBXBuildFile; fileRef = 61F040EE144757B500A0C788 /* PithosLocalObjectState.m */; };
81 81
		61F04133144DB97600A0C788 /* PithosSyncDaemon.m in Sources */ = {isa = PBXBuildFile; fileRef = 61F040EA144724F500A0C788 /* PithosSyncDaemon.m */; };
82
		E26038A7150009E400DAC6EB /* InspectorPane.m in Sources */ = {isa = PBXBuildFile; fileRef = E260389C150009E400DAC6EB /* InspectorPane.m */; };
83
		E26038A8150009E400DAC6EB /* InspectorPaneBody.m in Sources */ = {isa = PBXBuildFile; fileRef = E260389E150009E400DAC6EB /* InspectorPaneBody.m */; };
84
		E26038A9150009E400DAC6EB /* InspectorPaneContainer.m in Sources */ = {isa = PBXBuildFile; fileRef = E26038A0150009E400DAC6EB /* InspectorPaneContainer.m */; };
85
		E26038AA150009E400DAC6EB /* InspectorPaneHead.m in Sources */ = {isa = PBXBuildFile; fileRef = E26038A2150009E400DAC6EB /* InspectorPaneHead.m */; };
86
		E26038AB150009E400DAC6EB /* NSBezierPath+StrokeExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = E26038A4150009E400DAC6EB /* NSBezierPath+StrokeExtensions.m */; };
87
		E26038AC150009E400DAC6EB /* NSWindow+Geometry.m in Sources */ = {isa = PBXBuildFile; fileRef = E26038A6150009E400DAC6EB /* NSWindow+Geometry.m */; };
82
		E26038A7150009E400DAC6EB /* InspectorPane.m in Sources */ = {isa = PBXBuildFile; fileRef = E260389C150009E400DAC6EB /* InspectorPane.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
83
		E26038A8150009E400DAC6EB /* InspectorPaneBody.m in Sources */ = {isa = PBXBuildFile; fileRef = E260389E150009E400DAC6EB /* InspectorPaneBody.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
84
		E26038A9150009E400DAC6EB /* InspectorPaneContainer.m in Sources */ = {isa = PBXBuildFile; fileRef = E26038A0150009E400DAC6EB /* InspectorPaneContainer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
85
		E26038AA150009E400DAC6EB /* InspectorPaneHead.m in Sources */ = {isa = PBXBuildFile; fileRef = E26038A2150009E400DAC6EB /* InspectorPaneHead.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
86
		E26038AB150009E400DAC6EB /* NSBezierPath+StrokeExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = E26038A4150009E400DAC6EB /* NSBezierPath+StrokeExtensions.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
87
		E26038AC150009E400DAC6EB /* NSWindow+Geometry.m in Sources */ = {isa = PBXBuildFile; fileRef = E26038A6150009E400DAC6EB /* NSWindow+Geometry.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
88 88
		E26038B215000C4B00DAC6EB /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E26038B115000C4B00DAC6EB /* QuartzCore.framework */; };
89 89
/* End PBXBuildFile section */
90 90

  
......
782 782
			isa = XCBuildConfiguration;
783 783
			buildSettings = {
784 784
				ALWAYS_SEARCH_USER_PATHS = NO;
785
				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
786
				CLANG_ENABLE_OBJC_ARC = YES;
785 787
				COMBINE_HIDPI_IMAGES = YES;
786 788
				COPY_PHASE_STRIP = NO;
787 789
				GCC_DYNAMIC_NO_PIC = NO;
......
789 791
				GCC_PRECOMPILE_PREFIX_HEADER = YES;
790 792
				GCC_PREFIX_HEADER = "pithos-macos/pithos-macos-Prefix.pch";
791 793
				INFOPLIST_FILE = "pithos-macos/pithos-macos-Info.plist";
794
				MACOSX_DEPLOYMENT_TARGET = 10.6.8;
792 795
				PRODUCT_NAME = "$(TARGET_NAME)";
793 796
				WRAPPER_EXTENSION = app;
794 797
			};
......
798 801
			isa = XCBuildConfiguration;
799 802
			buildSettings = {
800 803
				ALWAYS_SEARCH_USER_PATHS = NO;
804
				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
805
				CLANG_ENABLE_OBJC_ARC = YES;
801 806
				COMBINE_HIDPI_IMAGES = YES;
802 807
				COPY_PHASE_STRIP = YES;
803 808
				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
......
805 810
				GCC_PRECOMPILE_PREFIX_HEADER = YES;
806 811
				GCC_PREFIX_HEADER = "pithos-macos/pithos-macos-Prefix.pch";
807 812
				INFOPLIST_FILE = "pithos-macos/pithos-macos-Info.plist";
813
				MACOSX_DEPLOYMENT_TARGET = 10.6.8;
808 814
				PRODUCT_NAME = "$(TARGET_NAME)";
809 815
				WRAPPER_EXTENSION = app;
810 816
			};
b/pithos-macos/AllowedToBoolTransformer.m
54 54
}
55 55

  
56 56
+ (void)initialize {
57
    [[self class] setValueTransformer:[[self new] autorelease] forName:@"AllowedToBoolTransformer"];
57
    [[self class] setValueTransformer:[self new] forName:@"AllowedToBoolTransformer"];
58 58
}
59 59

  
60 60
@end
b/pithos-macos/BytesExtendedSizeTransformer.m
50 50
- (id)transformedValue:(id)value {
51 51
    if (value == nil)
52 52
		return nil;
53
    NSNumberFormatter *numberFormatter = [[[NSNumberFormatter alloc] init] autorelease];
53
    NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
54 54
    [numberFormatter setGroupingSeparator:@","];
55 55
    [numberFormatter setUsesGroupingSeparator:YES];
56 56
    [numberFormatter setGroupingSize:3];    
......
88 88
}
89 89

  
90 90
+ (void)initialize {
91
    [[self class] setValueTransformer:[[self new] autorelease] forName:@"BytesExtendedSizeTransformer"];
91
    [[self class] setValueTransformer:[self new] forName:@"BytesExtendedSizeTransformer"];
92 92
}
93 93

  
94 94
@end
b/pithos-macos/BytesSizeTransformer.m
83 83
}
84 84

  
85 85
+ (void)initialize {
86
    [[self class] setValueTransformer:[[self new] autorelease] forName:@"BytesSizeTransformer"];
86
    [[self class] setValueTransformer:[self new] forName:@"BytesSizeTransformer"];
87 87
}
88 88

  
89 89
@end
b/pithos-macos/CountTransformer.m
54 54
}
55 55

  
56 56
+ (void)initialize {
57
    [[self class] setValueTransformer:[[self new] autorelease] forName:@"CountTransformer"];
57
    [[self class] setValueTransformer:[self new] forName:@"CountTransformer"];
58 58
}
59 59

  
60 60
@end
b/pithos-macos/DirPathFileURLTransformer.m
60 60
}
61 61

  
62 62
+ (void)initialize {
63
    [[self class] setValueTransformer:[[self new] autorelease] forName:@"DirPathFileURLTransformer"];
63
    [[self class] setValueTransformer:[self new] forName:@"DirPathFileURLTransformer"];
64 64
}
65 65

  
66 66
@end
b/pithos-macos/FileSystemBrowserCell.h
53 53
    NSColor *_labelColor;
54 54
}
55 55

  
56
@property(retain) NSImage *image;
57
@property(retain) NSColor *labelColor;
56
@property(strong) NSImage *image;
57
@property(strong) NSColor *labelColor;
58 58

  
59 59
@end
b/pithos-macos/FileSystemBrowserCell.m
69 69
    return result;
70 70
}
71 71

  
72
- (void)dealloc {
73
    [_image release];
74
    [_labelColor release];
75
    [super dealloc];
76
}
77 72

  
78 73
@synthesize image = _image;
79 74
@synthesize labelColor = _labelColor;
......
120 115
            [transform scaleXBy:1.0 yBy:-1.0];
121 116
            [transform translateXBy:0 yBy:-cellFrame.origin.y];
122 117
            [transform concat];
123
            [transform release];
124 118
        }
125 119
        [self.image drawInRect:imageRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
126 120
        if (flipped) {
b/pithos-macos/GroupMembersDictionaryTransformer.m
71 71
}
72 72

  
73 73
+ (void)initialize {
74
    [[self class] setValueTransformer:[[self new] autorelease] forName:@"GroupMembersDictionaryTransformer"];
74
    [[self class] setValueTransformer:[self new] forName:@"GroupMembersDictionaryTransformer"];
75 75
}
76 76

  
77 77
@end
b/pithos-macos/ImageAndTextCell.m
78 78
// -------------------------------------------------------------------------------
79 79
- (void)dealloc
80 80
{
81
    [image release];
82 81
    image = nil;
83
    [super dealloc];
84 82
}
85 83

  
86 84
// -------------------------------------------------------------------------------
......
89 87
- (id)copyWithZone:(NSZone*)zone
90 88
{
91 89
    ImageAndTextCell *cell = (ImageAndTextCell*)[super copyWithZone:zone];
92
    cell->image = [image retain];
90
    cell->image = image;
93 91
    return cell;
94 92
}
95 93

  
......
100 98
{
101 99
    if (anImage != image)
102 100
	{
103
        [image release];
104
        image = [anImage retain];
101
        image = anImage;
105 102
		[image setSize:NSMakeSize(kIconImageSize, kIconImageSize)];
106 103
    }
107 104
}
b/pithos-macos/LastCompletedSyncTransformer.m
75 75
}
76 76

  
77 77
+ (void)initialize {
78
    [[self class] setValueTransformer:[[self new] autorelease] forName:@"LastCompletedSyncTransformer"];
78
    [[self class] setValueTransformer:[self new] forName:@"LastCompletedSyncTransformer"];
79 79
}
80 80

  
81 81
@end
b/pithos-macos/LastModifiedDateTransformer.m
76 76
}
77 77

  
78 78
+ (void)initialize {
79
    [[self class] setValueTransformer:[[self new] autorelease] forName:@"LastModifiedDateTransformer"];
79
    [[self class] setValueTransformer:[self new] forName:@"LastModifiedDateTransformer"];
80 80
}
81 81

  
82 82
@end
b/pithos-macos/MetadataKeyTransformer.m
58 58
}
59 59

  
60 60
+ (void)initialize {
61
    [[self class] setValueTransformer:[[self new] autorelease] forName:@"MetadataKeyTransformer"];
61
    [[self class] setValueTransformer:[self new] forName:@"MetadataKeyTransformer"];
62 62
}
63 63

  
64 64
@end
b/pithos-macos/PithosAccount.h
80 80
    BOOL resetSyncDaemonLocalState;
81 81
}
82 82

  
83
@property (nonatomic, retain) NSString *uniqueName;
83
@property (nonatomic, strong) NSString *uniqueName;
84 84
@property (assign) BOOL active;
85
@property (nonatomic, retain) NSString *name;
85
@property (nonatomic, strong) NSString *name;
86 86

  
87 87
@property (nonatomic, assign) BOOL syncActive;
88
@property (nonatomic, retain) NSString *syncDirectoryPath;
89
@property (nonatomic, retain) NSMutableDictionary *syncAccountsDictionary;
88
@property (nonatomic, strong) NSString *syncDirectoryPath;
89
@property (nonatomic, strong) NSMutableDictionary *syncAccountsDictionary;
90 90
@property (nonatomic, assign) BOOL syncSkipHidden;
91
@property (nonatomic, retain) NSDate *syncLastCompleted;
92
@property (nonatomic, retain) PithosSyncDaemon *syncDaemon;
91
@property (nonatomic, strong) NSDate *syncLastCompleted;
92
@property (nonatomic, strong) PithosSyncDaemon *syncDaemon;
93 93

  
94
@property (nonatomic, retain) NSString *serverURL;
95
@property (retain) NSString *versionResource;
96
@property (retain) NSString *loginResource;
97
@property (retain) NSString *publicResource;
94
@property (nonatomic, strong) NSString *serverURL;
95
@property (strong) NSString *versionResource;
96
@property (strong) NSString *loginResource;
97
@property (strong) NSString *publicResource;
98 98

  
99
@property (nonatomic, retain) NSString *authUser;
100
@property (nonatomic, retain) NSString *authToken;
101
@property (nonatomic, retain) NSString *storageURLPrefix;
102
@property (nonatomic, retain) NSString *authURL;
103
@property (nonatomic, retain) NSString *publicURLPrefix;
104
@property (nonatomic, retain) NSString *loginURLPrefix;
99
@property (nonatomic, strong) NSString *authUser;
100
@property (nonatomic, strong) NSString *authToken;
101
@property (nonatomic, strong) NSString *storageURLPrefix;
102
@property (nonatomic, strong) NSString *authURL;
103
@property (nonatomic, strong) NSString *publicURLPrefix;
104
@property (nonatomic, strong) NSString *loginURLPrefix;
105 105

  
106 106
@property (readonly) ASIPithos *pithos;
107 107
@property (readonly) PithosAccountNode *accountNode;
b/pithos-macos/PithosAccount.m
57 57
#pragma mark Object Lifecycle
58 58

  
59 59
+ (id)pithosAccount {
60
    PithosAccount *pithosAccount = [[[self alloc] init] autorelease];
60
    PithosAccount *pithosAccount = [[self alloc] init];
61 61
    pithosAccount.uniqueName = [NSString stringWithFormat:@"pithosAccount-%f", [NSDate timeIntervalSinceReferenceDate]];
62 62
    pithosAccount.syncSkipHidden = YES;
63 63
    pithosAccount.versionResource = @"v1";
......
65 65
    return pithosAccount;
66 66
}
67 67

  
68
- (void)dealloc {
69
    [sharingAccountsNode release];
70
    [accountNode release];
71
    [pithos release];
72
    [publicURLPrefix release];
73
    [loginURLPrefix release];
74
    [authURL release];
75
    [storageURLPrefix release];
76
    [authToken release];
77
    [authUser release];
78
    [publicResource release];
79
    [loginResource release];
80
    [versionResource release];
81
    [serverURL release];
82
    [syncDaemon release];
83
    [syncLastCompleted release];
84
    [syncAccountsDictionary release];
85
    [syncDirectoryPath release];
86
    [name release];
87
    [uniqueName release];
88
    [super dealloc];
89
}
90 68

  
91 69
- (NSString *)description {
92 70
    return [NSString stringWithFormat:@"uniqueName: %@, active: %d, name: %@, syncActive: %d, syncDirectoryPath: %@, syncAccountsDictionary: %@, syncSkipHidden: %d, syncLastCompleted: %@, serverURL: %@, versionResource: %@, loginResource: %@, publicResource: %@, authUser: %@, authToken: %@, storageURLPrefix: %@, authURL: %@, loginURLPrefix: %@, publicURLPrefix: %@", 
......
110 88

  
111 89
- (NSString *)name {
112 90
    if (![name length]) {
113
        [name release];
114 91
        NSDictionary *pithosAccountsDictionary = [(pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate] pithosAccountsDictionary];
115 92
        NSString *namePrefix = @"okeanos";
116 93
        NSUInteger nameSuffix = 1;
......
121 98
               [fileManager fileExistsAtPath:[documentsDirectoryPath stringByAppendingPathComponent:name]]) {
122 99
            name = [NSString stringWithFormat:@"%@%ld", namePrefix, ++nameSuffix];
123 100
        }
124
        [name retain];
125 101
    }
126 102
    return name;
127 103
}
......
131 107
    if (![self.name isEqualToString:aName] && [aName length] && ![pithosAccountsDictionary objectForKey:aName]) {
132 108
        [pithosAccountsDictionary setObject:self forKey:aName];
133 109
        [pithosAccountsDictionary removeObjectForKey:name];
134
        [name release];
135
        name = [aName retain];
110
        name = aName;
136 111
    }
137 112
}
138 113

  
......
151 126

  
152 127
- (NSString *)syncDirectoryPath {
153 128
    if (![syncDirectoryPath length]) {
154
        [syncDirectoryPath release];
155
        syncDirectoryPath = [[[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] 
156
                              stringByAppendingPathComponent:self.name] retain];
129
        syncDirectoryPath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] 
130
                              stringByAppendingPathComponent:self.name];
157 131
    }
158 132
    return syncDirectoryPath;
159 133
}
......
162 136
    if (![self.syncDirectoryPath isEqualToString:aSyncDirectoryPath] && [aSyncDirectoryPath length]) {
163 137
        BOOL isDirectory;
164 138
        if (![[NSFileManager defaultManager] fileExistsAtPath:aSyncDirectoryPath isDirectory:&isDirectory] || isDirectory) {
165
            [syncDirectoryPath release];
166
            syncDirectoryPath = [aSyncDirectoryPath retain];
139
            syncDirectoryPath = aSyncDirectoryPath;
167 140
        } else {
168 141
            return;
169 142
        }
170 143

  
171 144
        @synchronized(self) {
172 145
            resetSyncDaemonLocalState = YES;
173
            [syncLastCompleted release];
174 146
            syncLastCompleted = nil;
175 147
        }
176 148
    }
......
178 150

  
179 151
- (NSMutableDictionary *)syncAccountsDictionary {
180 152
    if (!syncAccountsDictionary) {
181
        syncAccountsDictionary = [[NSMutableDictionary dictionaryWithObject:[NSMutableDictionary dictionaryWithObject:[NSMutableSet set] 
153
        syncAccountsDictionary = [NSMutableDictionary dictionaryWithObject:[NSMutableDictionary dictionaryWithObject:[NSMutableSet set] 
182 154
                                                                                                               forKey:@"pithos"] 
183
                                                                     forKey:@""] retain];
155
                                                                     forKey:@""];
184 156
    }        
185 157
    return syncAccountsDictionary;
186 158
}
187 159

  
188 160
- (void)setSyncAccountsDictionary:(NSMutableDictionary *)aSyncAccountsDictionary {
189 161
    if (aSyncAccountsDictionary && ![self.syncAccountsDictionary isEqualToDictionary:aSyncAccountsDictionary]) {
190
        [syncAccountsDictionary release];
191 162
        syncAccountsDictionary = [[NSMutableDictionary alloc] initWithCapacity:[aSyncAccountsDictionary count]];
192 163
        for (NSString *accountName in aSyncAccountsDictionary) {
193 164
            NSDictionary *aSyncContainersDictionary = [aSyncAccountsDictionary objectForKey:accountName];
......
203 174
        
204 175
        @synchronized(self) {
205 176
            resetSyncDaemonLocalState = YES;
206
            [syncLastCompleted release];
207 177
            syncLastCompleted = nil;
208 178
        }
209 179
    }
......
211 181

  
212 182
- (NSDate *)syncLastCompleted {
213 183
    if (self.syncDaemon.lastCompletedSync && ![self.syncDaemon.lastCompletedSync isEqualToDate:syncLastCompleted]) {
214
        [syncLastCompleted release];
215 184
        syncLastCompleted = [self.syncDaemon.lastCompletedSync copy];
216 185
    }
217 186
    return syncLastCompleted;
......
232 201

  
233 202
- (NSString *)serverURL {
234 203
    if (![self urlIsValid:serverURL]) {
235
        [serverURL release];
236
        serverURL = [@"https://pithos.okeanos.grnet.gr" retain];
204
        serverURL = @"https://pithos.okeanos.grnet.gr";
237 205
    }
238 206
    return serverURL;
239 207
}
240 208

  
241 209
- (void)setServerURL:(NSString *)aServerURL {
242 210
    if (![self.serverURL isEqualToString:aServerURL] && [self urlIsValid:aServerURL]) {
243
        [serverURL release];
244
        serverURL = [aServerURL retain];
245
        [storageURLPrefix release];
211
        serverURL = aServerURL;
246 212
        storageURLPrefix = nil;
247
        [authURL release];
248 213
        authURL = nil;
249
        [publicURLPrefix release];
250 214
        publicURLPrefix = nil;
251
        [loginURLPrefix release];
252 215
        loginURLPrefix = nil;
253 216

  
254 217
        @synchronized(self) {
255 218
            updatePithos = YES;
256 219
            resetSyncDaemonLocalState = YES;
257
            [syncLastCompleted release];
258 220
            syncLastCompleted = nil;
259 221
        }
260 222
    }
......
262 224

  
263 225
- (void)setAuthUser:(NSString *)anAuthUser {
264 226
    if ([anAuthUser length] && ![anAuthUser isEqualToString:authUser]) {
265
        [authUser release];
266
        authUser = [anAuthUser retain];
227
        authUser = anAuthUser;
267 228
        
268 229
        @synchronized(self) {
269 230
            updatePithos = YES;
270 231
            resetSyncDaemonLocalState = YES;
271
            [syncLastCompleted release];
272 232
            syncLastCompleted = nil;
273 233

  
274 234
        }
......
277 237

  
278 238
- (void)setAuthToken:(NSString *)anAuthToken {
279 239
    if ([anAuthToken length] && ![anAuthToken isEqualToString:authToken]) {
280
        [authToken release];
281
        authToken = [anAuthToken retain];
240
        authToken = anAuthToken;
282 241
        
283 242
        @synchronized(self) {
284 243
            updatePithos = YES;
......
288 247

  
289 248
- (NSString *)storageURLPrefix {
290 249
    if (![self urlIsValid:storageURLPrefix]) {
291
        [storageURLPrefix release];
292 250
        if (versionResource)
293
            storageURLPrefix = [[self.serverURL stringByAppendingFormat:@"/%@", versionResource] retain];
251
            storageURLPrefix = [self.serverURL stringByAppendingFormat:@"/%@", versionResource];
294 252
        else
295 253
            storageURLPrefix = [self.serverURL copy];
296 254
    }
......
299 257

  
300 258
- (void)setStorageURLPrefix:(NSString *)aStorageURLPrefix {
301 259
    if (![self.storageURLPrefix isEqualToString:aStorageURLPrefix] && [self urlIsValid:aStorageURLPrefix]) {
302
        [storageURLPrefix release];
303
        storageURLPrefix = [aStorageURLPrefix retain];
260
        storageURLPrefix = aStorageURLPrefix;
304 261
    }
305 262
}
306 263

  
307 264
- (NSString *)authURL {
308 265
    if (![self urlIsValid:authURL]) {
309
        [authURL release];
310 266
        if (versionResource)
311
            authURL = [[self.serverURL stringByAppendingFormat:@"/%@", versionResource] retain];
267
            authURL = [self.serverURL stringByAppendingFormat:@"/%@", versionResource];
312 268
        else
313 269
            authURL = [self.serverURL copy];
314 270
    }
......
317 273

  
318 274
- (void)setAuthURL:(NSString *)anAuthURL {
319 275
    if (![self.authURL isEqualToString:anAuthURL] && [self urlIsValid:anAuthURL]) {
320
        [authURL release];
321
        authURL = [anAuthURL retain];
276
        authURL = anAuthURL;
322 277
    }
323 278
}
324 279

  
325 280
- (NSString *)publicURLPrefix {
326 281
    if (![self urlIsValid:publicURLPrefix]) {
327
        [publicURLPrefix release];
328 282
        if (publicResource)
329
            publicURLPrefix = [[self.serverURL stringByAppendingFormat:@"/%@", publicResource] retain];
283
            publicURLPrefix = [self.serverURL stringByAppendingFormat:@"/%@", publicResource];
330 284
        else
331 285
            publicURLPrefix = [self.serverURL copy];
332 286
    }
......
335 289

  
336 290
- (void)setPublicURLPrefix:(NSString *)aPublicURLPrefix {
337 291
    if (![self.publicURLPrefix isEqualToString:aPublicURLPrefix] && [self urlIsValid:aPublicURLPrefix]) {
338
        [publicURLPrefix release];
339
        publicURLPrefix = [aPublicURLPrefix retain];
292
        publicURLPrefix = aPublicURLPrefix;
340 293
    }
341 294
}
342 295

  
343 296
- (NSString *)loginURLPrefix {
344 297
    if (![self urlIsValid:loginURLPrefix]) {
345
        [loginURLPrefix release];
346 298
        if (loginResource)
347
            loginURLPrefix = [[self.serverURL stringByAppendingFormat:@"/%@", loginResource] retain];
299
            loginURLPrefix = [self.serverURL stringByAppendingFormat:@"/%@", loginResource];
348 300
        else
349 301
            loginURLPrefix = [self.serverURL copy];
350 302
    }
......
353 305

  
354 306
- (void)setLoginURLPrefix:(NSString *)aLoginURLPrefix {
355 307
    if (![self.loginURLPrefix isEqualToString:aLoginURLPrefix] && [self urlIsValid:aLoginURLPrefix]) {
356
        [loginURLPrefix release];
357
        loginURLPrefix = [aLoginURLPrefix retain];
308
        loginURLPrefix = aLoginURLPrefix;
358 309
    }
359 310
}
360 311

  
361 312
- (ASIPithos *)pithos {
362 313
    @synchronized(self) {
363 314
        if (!pithos || updatePithos) {
364
            [pithos release];
365
            pithos = [[ASIPithos pithos] retain];
315
            pithos = [ASIPithos pithos];
366 316
            pithos.authUser = authUser;
367 317
            pithos.authToken = authToken;
368 318
            pithos.storageURLPrefix = self.storageURLPrefix;
......
458 408
    if ((self = [super init])) {
459 409
        self.uniqueName = [decoder decodeObjectForKey:@"uniqueName"];
460 410
        self.active = [decoder decodeBoolForKey:@"active"];
461
        name = [[decoder decodeObjectForKey:@"name"] retain];
411
        name = [decoder decodeObjectForKey:@"name"];
462 412

  
463 413
        self.syncActive = [decoder decodeBoolForKey:@"syncActive"];
464 414
        self.syncDirectoryPath = [decoder decodeObjectForKey:@"syncDirectoryPath"];
b/pithos-macos/PithosAccountNode.h
53 53
    BOOL reset;
54 54
}
55 55

  
56
@property(nonatomic, retain) ASIPithos *pithos;
57
@property(nonatomic, retain) ASIPithosAccount *pithosAccount;
56
@property(nonatomic, strong) ASIPithos *pithos;
57
@property(nonatomic, strong) ASIPithosAccount *pithosAccount;
58 58

  
59 59
- (id)initWithPithos:(ASIPithos *)aPithos;
60 60

  
b/pithos-macos/PithosAccountNode.m
52 52

  
53 53
+ (void)initialize {
54 54
	if (self == [PithosAccountNode class])
55
        sharedIcon = [[[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kUserIcon)] retain];
55
        sharedIcon = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kUserIcon)];
56 56
}
57 57

  
58 58
#pragma mark -
......
60 60

  
61 61
- (id)initWithPithos:(ASIPithos *)aPithos {
62 62
    if ((self = [super init])) {
63
        pithos = [aPithos retain];
63
        pithos = aPithos;
64 64
    }
65 65
    return self;
66 66
}
67 67

  
68 68
- (void)dealloc {
69 69
    [accountRequest clearDelegatesAndCancel];
70
    [accountRequest release];
71 70
    [refreshMetadataAccountRequest clearDelegatesAndCancel];
72
    [refreshMetadataAccountRequest release];
73 71
    [applyMetadataAccountRequest clearDelegatesAndCancel];
74
    [applyMetadataAccountRequest release];
75
    [containers release];
76
    [pithosAccount release];
77
    [pithos release];
78
    [super dealloc];
79 72
}
80 73

  
81 74
#pragma mark -
......
83 76

  
84 77
- (void)setPithos:(ASIPithos *)aPithos {
85 78
    if (aPithos && ![aPithos isEqualTo:pithos]) {
86
        [pithos release];
87
        pithos = [aPithos retain];
88
        [url release];
79
        pithos = aPithos;
89 80
        url = nil;
90 81
        [accountRequest clearDelegatesAndCancel];
91
        [accountRequest release];
92 82
        accountRequest = nil;
93 83
        [refreshMetadataAccountRequest clearDelegatesAndCancel];
94
        [refreshMetadataAccountRequest release];
95 84
        refreshMetadataAccountRequest = nil;
96 85
        [applyMetadataAccountRequest clearDelegatesAndCancel];
97
        [applyMetadataAccountRequest release];
98 86
        applyMetadataAccountRequest = nil;
99 87
        reset = YES;
100 88
    }
......
112 100
    @synchronized(self) {
113 101
        if (reset) {
114 102
            [accountRequest clearDelegatesAndCancel];
115
            [accountRequest release];
116 103
            accountRequest = nil;
117 104
            [refreshMetadataAccountRequest clearDelegatesAndCancel];
118
            [refreshMetadataAccountRequest release];
119 105
            refreshMetadataAccountRequest = nil;
120 106
            [applyMetadataAccountRequest clearDelegatesAndCancel];
121
            [applyMetadataAccountRequest release];
122 107
            applyMetadataAccountRequest = nil;
123
            [children release];
124 108
            children = nil;
125
            [newChildren release];
126 109
            newChildren = nil;
127 110
            self.pithosAccount = nil;
128 111
            freshness = PithosNodeStateRefreshNeeded;
......
135 118
                break;
136 119
            case PithosNodeStateRefreshNeeded:
137 120
                freshness = PithosNodeStateRefreshing;
138
                accountRequest = [[ASIPithosAccountRequest listContainersRequestWithPithos:pithos 
121
                accountRequest = [ASIPithosAccountRequest listContainersRequestWithPithos:pithos 
139 122
                                                                                     limit:0 
140 123
                                                                                    marker:nil 
141 124
                                                                                    shared:shared 
142
                                                                                     until:nil] retain];
125
                                                                                     until:nil];
143 126
                if (sharingAccount)
144 127
                    [accountRequest setRequestUserFromDefaultTo:sharingAccount withPithos:pithos];
145 128
                else if (!forcedRefresh)
......
159 142
                break;
160 143
            case PithosNodeStateRefreshFinished:
161 144
                if (newChildren) {
162
                    [children release];
163 145
                    children = newChildren;
164 146
                    newChildren = nil;
165 147
                }
......
174 156
- (NSString *)displayName {
175 157
    if (displayName == nil)
176 158
        return [NSString stringWithString:(sharingAccount ? sharingAccount : @"account")];
177
    return [[displayName copy] autorelease];
159
    return [displayName copy];
178 160
}
179 161

  
180 162
- (NSImage *)icon {
181 163
    if (icon == nil)
182
        icon = [sharedIcon retain];
164
        icon = sharedIcon;
183 165
    return icon;
184 166
}
185 167

  
......
202 184
        if (retries > 0) {
203 185
            ASIPithosAccountRequest *newAccountRequest = (ASIPithosAccountRequest *)[PithosUtilities copyRequest:accountRequest];
204 186
            [(NSMutableDictionary *)(newAccountRequest.userInfo)setObject:[NSNumber numberWithUnsignedInteger:(--retries)] forKey:@"retries"];
205
            [accountRequest release];
206 187
            accountRequest = newAccountRequest;
207 188
            [[PithosUtilities prepareRequest:accountRequest priority:[[accountRequest.userInfo objectForKey:@"priority"] integerValue]] startAsynchronous];
208 189
        } else {
209
            [newChildren release];
210 190
            newChildren = nil;
211
            [accountRequest release];
212 191
            accountRequest = nil;
213
            [containers release];
214 192
            containers = nil;
215 193
            forcedRefresh = NO;
216 194
            @synchronized(self) {
......
240 218
                    newChildren = [[NSMutableArray alloc] init];
241 219
                    NSMutableIndexSet *keptNodes = [NSMutableIndexSet indexSet];
242 220
                    for (ASIPithosContainer *container in containers) {
243
                        PithosContainerNode *node = [[[PithosContainerNode alloc] initWithPithos:pithos pithosContainer:container] autorelease];
221
                        PithosContainerNode *node = [[PithosContainerNode alloc] initWithPithos:pithos pithosContainer:container];
244 222
                        node.parent = self;
245 223
                        node.shared = shared;
246 224
                        node.sharingAccount = sharingAccount;
......
265 243
                    }]] makeObjectsPerformSelector:@selector(pithosNodeWillBeRemoved)];
266 244
                }
267 245
                // Else cache was used and all results were fetched during this request, so existing children can be reused
268
                [accountRequest release];
269 246
                accountRequest = nil;
270
                [containers release];
271 247
                containers = nil;
272 248
                forcedRefresh = NO;
273 249
                @synchronized(self) {
......
275 251
                }
276 252
                [self postChildrenUpdatedNotificationName];
277 253
            } else {
278
                [accountRequest release];
279 254
                // Do an additional request to fetch more objects
280
                accountRequest = [[ASIPithosAccountRequest listContainersRequestWithPithos:pithos 
255
                accountRequest = [ASIPithosAccountRequest listContainersRequestWithPithos:pithos 
281 256
                                                                                     limit:0 
282 257
                                                                                    marker:[[someContainers lastObject] name] 
283 258
                                                                                    shared:shared 
284
                                                                                     until:nil] retain];
259
                                                                                     until:nil];
285 260
                if (sharingAccount)
286 261
                    [accountRequest setRequestUserFromDefaultTo:sharingAccount withPithos:pithos];
287 262
                else if (!forcedRefresh)
......
299 274
            }
300 275
        } else if (accountRequest.responseStatusCode == 304) {
301 276
            // Account is not modified, so existing children can be reused
302
            [accountRequest release];
303 277
            accountRequest = nil;
304
            [containers release];
305 278
            containers = nil;
306 279
            forcedRefresh = NO;
307 280
            @synchronized(self) {
......
321 294
        
322 295
        if ([request isEqualTo:applyMetadataAccountRequest]) {
323 296
            @synchronized(self) {
324
                [applyMetadataAccountRequest release];
325 297
                applyMetadataAccountRequest = nil;
326 298
            }
327 299
            [self refreshInfo];
328 300
        } else if ([request isEqualTo:refreshMetadataAccountRequest]) {
329 301
            self.pithosAccount = [refreshMetadataAccountRequest account];
330 302
            @synchronized(self) {
331
                [refreshMetadataAccountRequest release];
332 303
                refreshMetadataAccountRequest = nil;
333 304
            }
334 305
        }
......
343 314
            [(NSMutableDictionary *)(newRequest.userInfo)setObject:[NSNumber numberWithUnsignedInteger:(--retries)] forKey:@"retries"];
344 315
            if ([request isEqualTo:applyMetadataAccountRequest]) {
345 316
                @synchronized(self) {
346
                    [applyMetadataAccountRequest release];
347 317
                    applyMetadataAccountRequest = newRequest;
348 318
                }
349 319
            } else if ([request isEqualTo:refreshMetadataAccountRequest]) {
350 320
                @synchronized(self) {
351
                    [refreshMetadataAccountRequest release];
352 321
                    refreshMetadataAccountRequest = newRequest;
353 322
                }
354 323
            }
355 324
            [[PithosUtilities prepareRequest:newRequest priority:[[newRequest.userInfo objectForKey:@"priority"] integerValue]] startAsynchronous];
356
            [newRequest release];
357 325
        } else {
358 326
            if ([request isEqualTo:applyMetadataAccountRequest]) {
359 327
                [PithosUtilities httpRequestErrorAlertWithRequest:applyMetadataAccountRequest];
360 328
                @synchronized(self) {
361
                    [applyMetadataAccountRequest release];
362 329
                    applyMetadataAccountRequest = nil;
363 330
                }
364 331
            } else if ([request isEqualTo:refreshMetadataAccountRequest]) {
365 332
                [PithosUtilities httpRequestErrorAlertWithRequest:refreshMetadataAccountRequest];
366 333
                @synchronized(self) {
367
                    [refreshMetadataAccountRequest release];
368 334
                    refreshMetadataAccountRequest = nil;
369 335
                }
370 336
            }
......
381 347
            NSMutableDictionary *groups = pithosAccount.groups;
382 348
            if ([groups count] == 0)
383 349
                groups = [NSMutableDictionary dictionaryWithObject:@"" forKey:@"group"];
384
            applyMetadataAccountRequest = [[ASIPithosAccountRequest updateAccountMetadataRequestWithPithos:pithos 
350
            applyMetadataAccountRequest = [ASIPithosAccountRequest updateAccountMetadataRequestWithPithos:pithos 
385 351
                                                                                                    groups:groups 
386 352
                                                                                                  metadata:pithosAccount.metadata 
387
                                                                                                    update:NO] retain];
353
                                                                                                    update:NO];
388 354
            applyMetadataAccountRequest.delegate = self;
389 355
            applyMetadataAccountRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
390 356
            applyMetadataAccountRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
......
402 368
- (void)refreshInfo {
403 369
    @synchronized(self) {
404 370
        if (refreshMetadataAccountRequest == nil) {
405
            refreshMetadataAccountRequest = [[ASIPithosAccountRequest accountMetadataRequestWithPithos:pithos] retain];
371
            refreshMetadataAccountRequest = [ASIPithosAccountRequest accountMetadataRequestWithPithos:pithos];
406 372
            refreshMetadataAccountRequest.delegate = self;
407 373
            refreshMetadataAccountRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
408 374
            refreshMetadataAccountRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
b/pithos-macos/PithosActivity.h
53 53
    NSString *message;
54 54
    NSUInteger totalBytes;
55 55
    NSUInteger currentBytes;
56
    PithosAccount *pithosAccount;
56
    PithosAccount *__unsafe_unretained pithosAccount;
57 57
}
58 58

  
59 59
- (id)initWithType:(PithosActivityType)aType pithosAccount:(PithosAccount *)aPithosAccount;
......
62 62
@property (nonatomic, copy) NSString *message;
63 63
@property (nonatomic, assign) NSUInteger totalBytes;
64 64
@property (nonatomic, assign) NSUInteger currentBytes;
65
@property (nonatomic, assign) PithosAccount *pithosAccount;
65
@property (nonatomic, unsafe_unretained) PithosAccount *pithosAccount;
66 66

  
67 67
@end
b/pithos-macos/PithosActivity.m
54 54
    return self;
55 55
}
56 56

  
57
- (void)dealloc {
58
    [message release];
59
    [super dealloc];
60
}
61 57

  
62 58
- (NSString *)description {
63 59
    if (pithosAccount)
b/pithos-macos/PithosActivityFacility.h
55 55
    NSTimer *timer;
56 56
    BOOL pickedRunning;
57 57
    
58
    id<PithosActivityFacilityDelegate> delegate;
58
    id<PithosActivityFacilityDelegate> __unsafe_unretained delegate;
59 59
}
60 60

  
61
@property (nonatomic, assign) id delegate;
61
@property (nonatomic, unsafe_unretained) id delegate;
62 62

  
63 63
+ (id)defaultPithosActivityFacility;
64 64

  
b/pithos-macos/PithosActivityFacility.m
39 39
#import "PithosAccount.h"
40 40
#import "pithos_macosAppDelegate.h"
41 41

  
42
static PithosActivityFacility *defaultPithosActivityFacility = nil;
42
//static PithosActivityFacility *defaultPithosActivityFacility = nil;
43 43

  
44 44
@implementation PithosActivityFacility
45 45
@synthesize delegate;
46 46

  
47
#pragma mark -
48 47
#pragma mark - Singleton
49 48

  
50 49
+ (id)defaultPithosActivityFacility {
51
	@synchronized(self) {
52
		if (!defaultPithosActivityFacility)
53
			[[self alloc] init]; // Assignment not done here
54
	}
55
	return defaultPithosActivityFacility;
56
}
57

  
58
+ (id)allocWithZone:(NSZone *)zone {
59
    @synchronized(self) {
60
        if (!defaultPithosActivityFacility) {
61
            defaultPithosActivityFacility = [super allocWithZone:zone];
62
            return defaultPithosActivityFacility;
63
        }
64
    }
65
    return nil;
66
}
67

  
68
- (id)copyWithZone:(NSZone *)zone {
69
    return self;
70
}
71

  
72
- (id)retain {
73
    return self;
50
    static dispatch_once_t pred = 0;
51
    __strong static id _sharedObject = nil;
52
    dispatch_once(&pred, ^{
53
        _sharedObject = [[self alloc] init];
54
    });
55
    return _sharedObject;
74 56
}
75 57

  
76
- (NSUInteger)retainCount {
77
    return UINT_MAX; // Can not be released
78
}
79

  
80
- (void)release {
81
    // Do nothing
82
}
83

  
84
- (id)autorelease {
85
    return self;
86
}
58
//+ (id)allocWithZone:(NSZone *)zone {
59
//    @synchronized(self) {
60
//        if (!defaultPithosActivityFacility) {
61
//            defaultPithosActivityFacility = [super allocWithZone:zone];
62
//            return defaultPithosActivityFacility;
63
//        }
64
//    }
65
//    return nil;
66
//}
67
//
68
//- (id)copyWithZone:(NSZone *)zone {
69
//    return self;
70
//}
71
//
72
//- (id)retain {
73
//    return self;
74
//}
75
//
76
//- (NSUInteger)retainCount {
77
//    return UINT_MAX; // Can not be released
78
//}
79
//
80
//- (void)release {
81
//    // Do nothing
82
//}
83
//
84
//- (id)autorelease {
85
//    return self;
86
//}
87 87

  
88
#pragma mark -
89
#pragma mark Object Lifecycle
88
#pragma mark - Object Lifecycle
90 89

  
91 90
- (id)init {
92 91
    if ((self = [super init])) {
......
97 96

  
98 97
- (void)dealloc {
99 98
    [timer invalidate];
100
    [timer release];
101
    [runningActivities release];
102
    [endingActivities release];
103
    [super dealloc];
104 99
}
105 100

  
106 101
- (void)reset {
107 102
    @synchronized(self) {
108 103
        [timer invalidate];
109
        [timer release];
110 104
        
111
        [runningActivities release];
112 105
        runningActivities = [[NSMutableArray alloc] init];
113
        [endingActivities release];
114 106
        endingActivities = [[NSMutableArray alloc] init];
115 107
        totalUploadBytes = 0;
116 108
        currentUploadBytes = 0;
......
119 111
        
120 112
        pickedRunning = NO;
121 113
        
122
        timer = [[NSTimer scheduledTimerWithTimeInterval:[(pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate] activityFacilityTimeInterval] 
114
        timer = [NSTimer scheduledTimerWithTimeInterval:[(pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate] activityFacilityTimeInterval] 
123 115
                                                  target:self 
124 116
                                                selector:@selector(update:) 
125 117
                                                userInfo:nil 
126
                                                 repeats:YES] retain];
118
                                                 repeats:YES];
127 119
    }
128 120
}
129 121

  
......
160 152
                if (activity.message)
161 153
                    break;
162 154
            }
163
            [activity retain];
164 155
            [endingActivities removeObjectsInRange:NSMakeRange(0, (index + 1))];
165 156
            pickedRunning = NO;
166 157
        } else if (runningActivitiesCount) {
167 158
            NSUInteger count;
168 159
            for (count = 0 ; count < runningActivitiesCount; count++) {
169
                activity = [[runningActivities objectAtIndex:0] retain];
160
                activity = [runningActivities objectAtIndex:0];
170 161
                [runningActivities removeObjectAtIndex:0];
171 162
                [runningActivities addObject:activity];
172 163
                if (activity.message) {
173 164
                    break;
174 165
                } else {
175
                    [activity release];
176 166
                    activity = nil;
177 167
                }
178 168
            }
......
190 180
        [info setObject:[NSNumber numberWithUnsignedInteger:currentUploadBytes] forKey:@"currentUploadBytes"];
191 181
        [info setObject:[NSNumber numberWithUnsignedInteger:totalDownloadBytes] forKey:@"totalDownloadBytes"];
192 182
        [info setObject:[NSNumber numberWithUnsignedInteger:currentDownloadBytes] forKey:@"currentDownloadBytes"];
193
        [activity release];
194 183
    }
195 184
    if (delegate) {
196 185
        [delegate activityUpdate:info];
......
205 194
                               totalBytes:(NSUInteger)totalBytes 
206 195
                             currentBytes:(NSUInteger)currentBytes 
207 196
                            pithosAccount:(PithosAccount *)pithosAccount {
208
    PithosActivity *activity = [[[PithosActivity alloc] initWithType:type pithosAccount:pithosAccount] autorelease];
197
    PithosActivity *activity = [[PithosActivity alloc] initWithType:type pithosAccount:pithosAccount];
209 198
    activity.message = message;
210 199
    activity.totalBytes = totalBytes;
211 200
    activity.currentBytes = currentBytes;
......
257 246
- (PithosActivity *)startAndEndActivityWithType:(PithosActivityType)type 
258 247
                                        message:(NSString *)message 
259 248
                                  pithosAccount:(PithosAccount *)pithosAccount {
260
    PithosActivity *activity = [[[PithosActivity alloc] initWithType:type pithosAccount:pithosAccount] autorelease];
249
    PithosActivity *activity = [[PithosActivity alloc] initWithType:type pithosAccount:pithosAccount];
261 250
    activity.message = message;
262 251
    activity.totalBytes = 0;
263 252
    activity.currentBytes = 0;
b/pithos-macos/PithosBrowserController.h
61 61
    
62 62
    NSViewController *sharedPreviewController;
63 63
    
64
    NSSplitView *verticalSplitView;
65
    NSSplitView *horizontalSplitView;
66
    NSView *leftTopView;
67
    NSView *leftBottomView;
68
    NSOutlineView *outlineView;
69
    NSBrowser *browser;
70
    NSMenu *outlineViewMenu;
71
    NSMenu *browserMenu;
64
    NSSplitView *__unsafe_unretained verticalSplitView;
65
    NSSplitView *__unsafe_unretained horizontalSplitView;
66
    NSView *__unsafe_unretained leftTopView;
67
    NSView *__unsafe_unretained leftBottomView;
68
    NSOutlineView *__unsafe_unretained outlineView;
69
    NSBrowser *__unsafe_unretained browser;
70
    NSMenu *__unsafe_unretained outlineViewMenu;
71
    NSMenu *__unsafe_unretained browserMenu;
72 72
    
73 73
    BOOL editingItem;
74 74
    
......
79 79
    PithosNode *clipboardParentNode;
80 80
    BOOL clipboardCopy;
81 81
    
82
    NSTextField *activityTextField;
83
    NSProgressIndicator *activityProgressIndicator;
82
    NSTextField *__unsafe_unretained activityTextField;
83
    NSProgressIndicator *__unsafe_unretained activityProgressIndicator;
84 84
    PithosActivityFacility *activityFacility;
85 85
    
86 86
    NSTimer *refreshTimer;
......
102 102
    NSOperationQueue *downloadCallbackQueue;
103 103
}
104 104

  
105
@property (nonatomic, retain) ASIPithos *pithos;
105
@property (nonatomic, strong) ASIPithos *pithos;
106 106

  
107
@property (nonatomic, retain) PithosAccountNode *accountNode;
107
@property (nonatomic, strong) PithosAccountNode *accountNode;
108 108

  
109
@property (nonatomic, assign) IBOutlet NSSplitView *verticalSplitView;
110
@property (nonatomic, assign) IBOutlet NSSplitView *horizontalSplitView;
111
@property (nonatomic, assign) IBOutlet NSView *leftTopView;
112
@property (nonatomic, assign) IBOutlet NSView *leftBottomView;
113
@property (nonatomic, assign) IBOutlet NSOutlineView *outlineView;
114
@property (nonatomic, assign) IBOutlet NSBrowser *browser;
115
@property (nonatomic, assign) IBOutlet NSMenu *outlineViewMenu;
116
@property (nonatomic, assign) IBOutlet NSMenu *browserMenu;
109
@property (nonatomic, unsafe_unretained) IBOutlet NSSplitView *verticalSplitView;
110
@property (nonatomic, unsafe_unretained) IBOutlet NSSplitView *horizontalSplitView;
111
@property (nonatomic, unsafe_unretained) IBOutlet NSView *leftTopView;
112
@property (nonatomic, unsafe_unretained) IBOutlet NSView *leftBottomView;
113
@property (nonatomic, unsafe_unretained) IBOutlet NSOutlineView *outlineView;
114
@property (nonatomic, unsafe_unretained) IBOutlet NSBrowser *browser;
115
@property (nonatomic, unsafe_unretained) IBOutlet NSMenu *outlineViewMenu;
116
@property (nonatomic, unsafe_unretained) IBOutlet NSMenu *browserMenu;
117 117

  
118
@property (nonatomic, retain) NSArray *draggedNodes;
119
@property (nonatomic, retain) PithosNode *draggedParentNode;
118
@property (nonatomic, strong) NSArray *draggedNodes;
119
@property (nonatomic, strong) PithosNode *draggedParentNode;
120 120

  
121
@property (nonatomic, retain) NSArray *clipboardNodes;
122
@property (nonatomic, retain) PithosNode *clipboardParentNode;
121
@property (nonatomic, strong) NSArray *clipboardNodes;
122
@property (nonatomic, strong) PithosNode *clipboardParentNode;
123 123
@property (nonatomic, assign) BOOL clipboardCopy;
124 124

  
125
@property (nonatomic, assign) IBOutlet NSTextField *activityTextField;
126
@property (nonatomic, assign) IBOutlet NSProgressIndicator *activityProgressIndicator;
125
@property (nonatomic, unsafe_unretained) IBOutlet NSTextField *activityTextField;
126
@property (nonatomic, unsafe_unretained) IBOutlet NSProgressIndicator *activityProgressIndicator;
127 127

  
128 128
- (IBAction)forceRefresh:(id)sender;
129 129
- (IBAction)refresh:(id)sender;
b/pithos-macos/PithosBrowserController.m
211 211
    [activityProgressIndicator setMaxValue:1.0];
212 212
    activityFacility = [PithosActivityFacility defaultPithosActivityFacility];
213 213
    
214
    self.accountNode = [[[PithosAccountNode alloc] initWithPithos:pithos] autorelease];
214
    self.accountNode = [[PithosAccountNode alloc] initWithPithos:pithos];
215 215
    containersNode = [[PithosEmptyNode alloc] initWithDisplayName:@"CONTAINERS" icon:nil];
216 216
    containersNodeChildren = [[NSMutableArray alloc] init];
217 217
    sharedNode = [[PithosEmptyNode alloc] initWithDisplayName:@"SHARED" icon:nil];
......
223 223
    othersSharedNode.displayName = @"shared to me";
224 224
    othersSharedNode.icon = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kGroupIcon)];
225 225
    
226
    [[[outlineView tableColumns] objectAtIndex:0] setDataCell:[[[PithosOutlineViewCell alloc] init] autorelease]];
226
    [[[outlineView tableColumns] objectAtIndex:0] setDataCell:[[PithosOutlineViewCell alloc] init]];
227 227
    
228 228
    // Register for updates
229 229
    // PithosAccountNode accountNode updates outlineView container nodes 
......
250 250
    }
251 251

  
252 252
    [refreshTimer invalidate];
253
    [refreshTimer release];
254 253
    
255 254
    [moveNetworkQueue reset];
256 255
    [copyNetworkQueue reset];
......
346 345
//    [activityFacility reset];
347 346
    activityFacility.delegate = self;
348 347
            
349
    refreshTimer = [[NSTimer scheduledTimerWithTimeInterval:REFRESH_TIMER_INTERVAL 
348
    refreshTimer = [NSTimer scheduledTimerWithTimeInterval:REFRESH_TIMER_INTERVAL 
350 349
                                                     target:self 
351 350
                                                   selector:@selector(forceRefresh:) 
352 351
                                                   userInfo:self 
353
                                                    repeats:YES] retain];
352
                                                    repeats:YES];
354 353
    @synchronized(self) {
355 354
        browserActive = YES;
356 355
    }
......
377 376
- (void)dealloc {
378 377
    [[NSNotificationCenter defaultCenter] removeObserver:self];
379 378
    [self resetBrowser];
380
    [moveQueue release];
381
    [copyQueue release];
382
    [deleteQueue release];
383
    [uploadQueue release];
384
    [downloadQueue release];
385
    [moveNetworkQueue release];
386
    [copyNetworkQueue release];
387
    [deleteNetworkQueue release];
388
    [uploadNetworkQueue release];
389
    [downloadNetworkQueue release];
390
    [clipboardParentNode release];
391
    [clipboardNodes release];
392
    [draggedParentNode release];
393
    [draggedNodes release];
394
    [sharedPreviewController release];
395
    [othersSharedNode release];
396
    [mySharedNode release];
397
    [sharedNode release];
398
    [containersNodeChildren release];
399
    [containersNode release];
400
    [accountNode release];
401
    [rootNode release];
402
    [pithos release];
403
    [super dealloc];
404 379
}
405 380

  
406 381
- (void)setPithos:(ASIPithos *)aPithos {
......
410 385
            ![aPithos.storageURLPrefix isEqualToString:pithos.storageURLPrefix] ||
411 386
            ![aPithos.publicURLPrefix isEqualToString:pithos.publicURLPrefix]) {
412 387
            [self resetBrowser];
413
            [pithos release];
414
            pithos = [aPithos retain];
388
            pithos = aPithos;
415 389
            [self startBrowser];
416 390
        } else {
417 391
            [self startBrowser];
......
630 604
                                              isDirectory:&isDirectory 
631 605
                                           sharingAccount:nil]) {
632 606
                    dispatch_async(dispatch_get_main_queue(), ^{
633
                        NSAlert *alert = [[[NSAlert alloc] init] autorelease];
607
                        NSAlert *alert = [[NSAlert alloc] init];
634 608
                        [alert setMessageText:@"Name Taken"];
635 609
                        [alert setInformativeText:[NSString stringWithFormat:@"The name '%@' is already taken. Please choose a different name", newName]];
636 610
                        [alert addButtonWithTitle:@"OK"];
......
698 672
                                              isDirectory:&isDirectory 
699 673
                                           sharingAccount:nil]) {
700 674
                    dispatch_async(dispatch_get_main_queue(), ^{
701
                        NSAlert *alert = [[[NSAlert alloc] init] autorelease];
675
                        NSAlert *alert = [[NSAlert alloc] init];
702 676
                        [alert setMessageText:@"Name Taken"];
703 677
                        [alert setInformativeText:[NSString stringWithFormat:@"The name '%@' is already taken. Please choose a different name", newName]];
704 678
                        [alert addButtonWithTitle:@"OK"];
......
801 775
        [names addObject:node.displayName];
802 776
        // If the node is a subdir ask if the whole tree should be downloaded
803 777
        if ([node class] == [PithosSubdirNode class]) {
804
            NSAlert *alert = [[[NSAlert alloc] init] autorelease];
778
            NSAlert *alert = [[NSAlert alloc] init];
805 779
            [alert setMessageText:@"Download directory"];
806 780
            [alert setInformativeText:[NSString stringWithFormat:@"'%@' is a directory, do you want to download its contents?", node.displayName]];
807 781
            [alert addButtonWithTitle:@"OK"];
......
942 916
    } else {
943 917
        [menuNodes addObject:[browser itemAtIndexPath:clickedNodeIndexPath]];
944 918
    }
945
    NSMenuItem *menuItem = [[[NSMenuItem alloc] init] autorelease];
919
    NSMenuItem *menuItem = [[NSMenuItem alloc] init];
946 920
    menuItem.representedObject = menuNodes;
947 921
    [self menuDownload:menuItem];
948 922
}
......
1166 1140
                [uploadQueue addOperation:operation];
1167 1141
            } else {
1168 1142
                // Upload directory, confirm first
1169
                NSAlert *alert = [[[NSAlert alloc] init] autorelease];
1143
                NSAlert *alert = [[NSAlert alloc] init];
1170 1144
                [alert setMessageText:@"Upload directory"];
1171 1145
                [alert setInformativeText:[NSString stringWithFormat:@"'%@' is a directory, do you want to upload it and its contents?", filePath]];
1172 1146
                [alert addButtonWithTitle:@"OK"];
......
1562 1536
        return;
1563 1537
    }
1564 1538
    // Add an operation to the callbackQueue with a completionBlock for the case of cancellation
1565
    NSInvocationOperation *operation = [[[NSInvocationOperation alloc] initWithTarget:self 
1539
    NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self 
1566 1540
                                                                             selector:NSSelectorFromString([request.userInfo objectForKey:@"didFinishSelector"]) 
1567
                                                                               object:request] autorelease];
1541
                                                                               object:request];
1568 1542
    operation.completionBlock = ^{
1569 1543
        @autoreleasepool {
1570 1544
            if ([[request.userInfo objectForKey:@"operation"] isCancelled]) {
......
1606 1580
            return;
1607 1581
        }
1608 1582
        // Add an operation to the callbackQueue with a completionBlock for the case of cancellation
1609
        NSInvocationOperation *operation = [[[NSInvocationOperation alloc] initWithTarget:self 
1583
        NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self 
1610 1584
                                                                                 selector:NSSelectorFromString([request.userInfo objectForKey:@"didFailSelector"]) 
1611
                                                                                   object:request] autorelease];
1585
                                                                                   object:request];
1612 1586
        operation.completionBlock = ^{
1613 1587
            @autoreleasepool {
1614 1588
                if ([[request.userInfo objectForKey:@"operation"] isCancelled]) {
......
1639 1613
        }
1640 1614
        NSUInteger retries = [[request.userInfo objectForKey:@"retries"] unsignedIntegerValue];
1641 1615
        if (retries > 0) {
1642
            ASIPithosRequest *newRequest = (ASIPithosRequest *)[[PithosUtilities copyRequest:request] autorelease];
1616
            ASIPithosRequest *newRequest = (ASIPithosRequest *)[PithosUtilities copyRequest:request];
1643 1617
            [(NSMutableDictionary *)(newRequest.userInfo)setObject:[NSNumber numberWithUnsignedInteger:(--retries)] forKey:@"retries"];
1644 1618
            [(NSMutableDictionary *)(newRequest.userInfo)setObject:[NSNumber numberWithBool:NO] forKey:@"unexpectedResponseStatus"];
1645 1619
            [[newRequest.userInfo objectForKey:@"networkQueue"] addOperation:[PithosUtilities prepareRequest:newRequest priority:[[newRequest.userInfo objectForKey:@"priority"] integerValue]]];
......
1680 1654
                if (![fileManager fileExistsAtPath:filePath]) {
1681 1655
                    if (![fileManager createFileAtPath:filePath contents:nil attributes:nil]) {
1682 1656
                        dispatch_async(dispatch_get_main_queue(), ^{
1683
                            NSAlert *alert = [[[NSAlert alloc] init] autorelease];
1657
                            NSAlert *alert = [[NSAlert alloc] init];
1684 1658
                            [alert setMessageText:@"Create File Error"];
1685 1659
                            [alert setInformativeText:[NSString stringWithFormat:@"Cannot create zero length file at %@", filePath]];
1686 1660
                            [alert addButtonWithTitle:@"OK"];
......
1770 1744
                dispatch_async(dispatch_get_main_queue(), ^{
1771 1745
                    [activityFacility endActivity:activity 
1772 1746
                                      withMessage:[objectRequest.userInfo objectForKey:@"failedActivityMessage"]]; 
1773
                    NSAlert *alert = [[[NSAlert alloc] init] autorelease];
1747
                    NSAlert *alert = [[NSAlert alloc] init];
1774 1748
                    [alert setMessageText:@"Upload Timeout"];
1775 1749
                    [alert setInformativeText:[NSString stringWithFormat:@"Upload iteration limit reached for object with path '%@'", 
1776 1750
                                               [objectRequest.userInfo objectForKey:@"objectName"]]];
......
2175 2149
            return;
2176 2150
        // New Folder
2177 2151
        if (!menuNode.shared && !menuNode.sharingAccount) {
2178
            menuItem = [[[NSMenuItem alloc] initWithTitle:@"New Folder" action:@selector(menuNewFolder:) keyEquivalent:@""] autorelease];
2152
            menuItem = [[NSMenuItem alloc] initWithTitle:@"New Folder" action:@selector(menuNewFolder:) keyEquivalent:@""];
2179 2153
            [menuItem setRepresentedObject:menuNode];
2180 2154
            [menu addItem:menuItem];
2181 2155
            [menu addItem:[NSMenuItem separatorItem]];
2182 2156
        }
2183 2157
        // Refresh
2184
        menuItem = [[[NSMenuItem alloc] initWithTitle:@"Refresh" action:@selector(refresh:) keyEquivalent:@""] autorelease];
2158
        menuItem = [[NSMenuItem alloc] initWithTitle:@"Refresh" action:@selector(refresh:) keyEquivalent:@""];
2185 2159
        [menu addItem:menuItem];
2186 2160
        [menu addItem:[NSMenuItem separatorItem]];
2187 2161
        // Get Info
2188
        menuItem = [[[NSMenuItem alloc] initWithTitle:(([menuNode class] == [PithosContainerNode class]) ? @"Info" : @"Info and Sharing") 
2162
        menuItem = [[NSMenuItem alloc] initWithTitle:(([menuNode class] == [PithosContainerNode class]) ? @"Info" : @"Info and Sharing") 
2189 2163
                                               action:@selector(menuGetInfo:) 
2190
                                        keyEquivalent:@""] autorelease];
2164
                                        keyEquivalent:@""];
2191 2165
        [menuItem setRepresentedObject:[NSArray arrayWithObject:menuNode]];
2192 2166
        [menu addItem:menuItem];
2193 2167
        // Paste
......
2204 2178
                else
2205 2179
                    menuItemTitle = @"Paste Items";
2206 2180
                [menu addItem:[NSMenuItem separatorItem]];
2207
                menuItem = [[[NSMenuItem alloc] initWithTitle:menuItemTitle action:@selector(menuPaste:) keyEquivalent:@""] autorelease];
2181
                menuItem = [[NSMenuItem alloc] initWithTitle:menuItemTitle action:@selector(menuPaste:) keyEquivalent:@""];
2208 2182
                [menuItem setRepresentedObject:menuNode];
2209 2183
                [menu addItem:menuItem];
2210 2184
            }
......
2215 2189
        PithosNode *firstMenuNode = [menuNodes objectAtIndex:0];
2216 2190
        // Download
2217 2191
        if (([firstMenuNode class] != [PithosContainerNode class]) && ([firstMenuNode class] != [PithosAccountNode class])) {
2218
            menuItem = [[[NSMenuItem alloc] initWithTitle:@"Download" action:@selector(menuDownload:) keyEquivalent:@""] autorelease];
2192
            menuItem = [[NSMenuItem alloc] initWithTitle:@"Download" action:@selector(menuDownload:) keyEquivalent:@""];
2219 2193
            [menuItem setRepresentedObject:menuNodes];
2220 2194
            [menu addItem:menuItem];
2221 2195
            [menu addItem:[NSMenuItem separatorItem]];
......
2224 2198
        // Delete
2225 2199
        if (!firstMenuNode.shared && !firstMenuNode.sharingAccount && ([rootNode class] == [PithosContainerNode class])) {
2226 2200
            if ([rootNode.pithosContainer.name isEqualToString:@"pithos"]) {
2227
                menuItem = [[[NSMenuItem alloc] initWithTitle:@"Move to Trash" 
2201
                menuItem = [[NSMenuItem alloc] initWithTitle:@"Move to Trash" 
2228 2202
                                                       action:@selector(menuMoveToTrash:) 
2229
                                                keyEquivalent:@""] autorelease];
2203
                                                keyEquivalent:@""];
2230 2204
                [menuItem setRepresentedObject:menuNodes];
2231 2205
                [menu addItem:menuItem];
2232 2206
            }
2233
            menuItem = [[[NSMenuItem alloc] initWithTitle:@"Delete" action:@selector(menuDelete:) keyEquivalent:@""] autorelease];
2207
            menuItem = [[NSMenuItem alloc] initWithTitle:@"Delete" action:@selector(menuDelete:) keyEquivalent:@""];
2234 2208
            [menuItem setRepresentedObject:menuNodes];
2235 2209
            [menu addItem:menuItem];
2236 2210
            [menu addItem:[NSMenuItem separatorItem]];
2237 2211
        }
2238 2212
        // Refresh
2239
        menuItem = [[[NSMenuItem alloc] initWithTitle:@"Refresh" action:@selector(refresh:) keyEquivalent:@""] autorelease];
2213
        menuItem = [[NSMenuItem alloc] initWithTitle:@"Refresh" action:@selector(refresh:) keyEquivalent:@""];
2240 2214
        [menu addItem:menuItem];
2241 2215
        // Get Info
2242 2216
        if (!firstMenuNode.sharingAccount || ([firstMenuNode class] != [PithosAccountNode class])) {
2243 2217
            [menu addItem:[NSMenuItem separatorItem]];
2244
            menuItem = [[[NSMenuItem alloc] initWithTitle:(([firstMenuNode class] == [PithosContainerNode class]) ? @"Info" : @"Info and Sharing") 
2218
            menuItem = [[NSMenuItem alloc] initWithTitle:(([firstMenuNode class] == [PithosContainerNode class]) ? @"Info" : @"Info and Sharing") 
2245 2219
                                                   action:@selector(menuGetInfo:) 
2246
                                            keyEquivalent:@""] autorelease];
2220
                                            keyEquivalent:@""];
2247 2221
            [menuItem setRepresentedObject:menuNodes];
2248 2222
            [menu addItem:menuItem];
2249 2223
            
......
2256 2230
                menuItemTitle = [NSString stringWithFormat:@"Cut \"%@\"", ((PithosNode *)[menuNodes objectAtIndex:0]).displayName];
2257 2231
            else 
2258 2232
                menuItemTitle = [NSString stringWithFormat:@"Cut %lu Items", menuNodesCount];
2259
            menuItem = [[[NSMenuItem alloc] initWithTitle:menuItemTitle action:@selector(menuCut:) keyEquivalent:@""] autorelease];
2233
            menuItem = [[NSMenuItem alloc] initWithTitle:menuItemTitle action:@selector(menuCut:) keyEquivalent:@""];
2260 2234
            [menuItem setRepresentedObject:menuNodes];
2261 2235
            [menu addItem:menuItem];
2262 2236
        }
......
2267 2241
                menuItemTitle = [NSString stringWithFormat:@"Copy \"%@\"", ((PithosNode *)[menuNodes objectAtIndex:0]).displayName];
2268 2242
            else 
2269 2243
                menuItemTitle = [NSString stringWithFormat:@"Copy %lu Items", menuNodesCount];
2270
            menuItem = [[[NSMenuItem alloc] initWithTitle:menuItemTitle action:@selector(menuCopy:) keyEquivalent:@""] autorelease];
2244
            menuItem = [[NSMenuItem alloc] initWithTitle:menuItemTitle action:@selector(menuCopy:) keyEquivalent:@""];
2271 2245
            [menuItem setRepresentedObject:menuNodes];
2272 2246
            [menu addItem:menuItem];
2273 2247
        }
......
2283 2257
                    menuItemTitle = @"Paste Item";
2284 2258
                else
2285 2259
                    menuItemTitle = @"Paste Items";
2286
                menuItem = [[[NSMenuItem alloc] initWithTitle:menuItemTitle action:@selector(menuPaste:) keyEquivalent:@""] autorelease];
2260
                menuItem = [[NSMenuItem alloc] initWithTitle:menuItemTitle action:@selector(menuPaste:) keyEquivalent:@""];
2287 2261
                [menuItem setRepresentedObject:firstMenuNode];
2288 2262
                [menu addItem:menuItem];
2289 2263
            }
......
2752 2726
    }
2753 2727
    
2754 2728
    if (!message)
2755
        message = [[[[UsingSizeTransformer alloc] init] autorelease] transformedValue:accountNode.pithosAccount];
2729
        message = [[[UsingSizeTransformer alloc] init] transformedValue:accountNode.pithosAccount];
2756 2730
    [activityTextField setStringValue:message];
2757 2731
}
2758 2732

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff