#4822 Enable Automatic Reference Counting

This commit is contained in:
Mitchell Livingston
2012-03-10 03:38:58 +00:00
parent 302e33771a
commit 11f57ccb18
71 changed files with 259 additions and 675 deletions

View File

@@ -48,8 +48,8 @@ enum
- (void) awakeFromNib
{
//store box colors
fGreenAvailabilityColor = [[NSColor colorWithCalibratedRed: 0.0 green: 1.0 blue: 0.4 alpha: 1.0] retain];
fBluePieceColor = [[NSColor colorWithCalibratedRed: 0.0 green: 0.4 blue: 0.8 alpha: 1.0] retain];
fGreenAvailabilityColor = [NSColor colorWithCalibratedRed: 0.0 green: 1.0 blue: 0.4 alpha: 1.0];
fBluePieceColor = [NSColor colorWithCalibratedRed: 0.0 green: 0.4 blue: 0.8 alpha: 1.0];
//actually draw the box
[self setTorrent: nil];
@@ -59,10 +59,7 @@ enum
{
tr_free(fPieces);
[fGreenAvailabilityColor release];
[fBluePieceColor release];
[super dealloc];
}
- (void) setTorrent: (Torrent *) torrent
@@ -87,11 +84,9 @@ enum
NSGradient * gradient = [[NSGradient alloc] initWithStartingColor: [NSColor colorWithCalibratedWhite: 0.0 alpha: 0.4]
endingColor: [NSColor colorWithCalibratedWhite: 0.2 alpha: 0.4]];
[gradient drawInRect: [self bounds] angle: 90.0];
[gradient release];
[back unlockFocus];
[self setImage: back];
[back release];
[self setNeedsDisplay];
}