From 0b1bc0cc8a87e64a951df66b4f36adb390fb904a Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Wed, 29 Aug 2007 02:13:38 +0000 Subject: [PATCH] make image background views always opaque and other trivial changes --- macosx/Controller.m | 2 +- macosx/ImageBackgroundView.m | 5 +++++ macosx/PiecesView.m | 6 ++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index 2eea0db62..fc44e313a 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -1859,7 +1859,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy if (totalCount != 1) [totalTorrentsString appendFormat: NSLocalizedString(@"%d Transfers", "Status bar transfer count"), totalCount]; else - [totalTorrentsString appendFormat: NSLocalizedString(@"1 Transfer", "Status bar transfer count")]; + [totalTorrentsString appendString: NSLocalizedString(@"1 Transfer", "Status bar transfer count")]; [fTotalTorrentsField setStringValue: totalTorrentsString]; [totalTorrentsString release]; diff --git a/macosx/ImageBackgroundView.m b/macosx/ImageBackgroundView.m index 479855fa3..a7a9b8f67 100644 --- a/macosx/ImageBackgroundView.m +++ b/macosx/ImageBackgroundView.m @@ -34,6 +34,11 @@ [self setNeedsDisplay: YES]; } +- (BOOL) isOpaque +{ + return YES; +} + - (void) dealloc { [fBackgroundColor release]; diff --git a/macosx/PiecesView.m b/macosx/PiecesView.m index 2b952aef9..5b2759eec 100644 --- a/macosx/PiecesView.m +++ b/macosx/PiecesView.m @@ -35,8 +35,7 @@ if ((self = [super initWithCoder: decoder])) { fTorrent = nil; - int numPieces = MAX_ACROSS * MAX_ACROSS; - fPieces = malloc(numPieces); + fPieces = malloc(MAX_ACROSS * MAX_ACROSS); } return self; @@ -44,11 +43,10 @@ - (void) awakeFromNib { - NSSize size = [self bounds].size; NSBezierPath * bp = [NSBezierPath bezierPathWithRect: [self bounds]]; //back image - fBack = [[NSImage alloc] initWithSize: size]; + fBack = [[NSImage alloc] initWithSize: [self bounds].size]; [fBack lockFocus]; [[NSColor colorWithCalibratedWhite: 0.0 alpha: 0.4] set];