From e5aab6902aca6462a3318c88b0c6714033dc30fb Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Fri, 16 Jun 2006 03:13:58 +0000 Subject: [PATCH] I changed my mind about the images being static. --- macosx/TorrentTableView.h | 3 +++ macosx/TorrentTableView.m | 21 ++++++--------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/macosx/TorrentTableView.h b/macosx/TorrentTableView.h index 3efd791b8..f9089d33a 100644 --- a/macosx/TorrentTableView.h +++ b/macosx/TorrentTableView.h @@ -38,6 +38,9 @@ NSPoint fClickPoint; IBOutlet NSMenu * fContextRow, * fContextNoRow; + + NSImage * fResumeOnIcon, * fResumeOffIcon, * fPauseOnIcon, * fPauseOffIcon, + * fRevealOnIcon, * fRevealOffIcon; } - (void) setTorrents: (NSArray *) torrents; diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index 2495e4798..07af01b50 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -44,25 +44,16 @@ @implementation TorrentTableView -static NSImage * fResumeOnIcon, * fResumeOffIcon, * fPauseOnIcon, * fPauseOffIcon, - * fRevealOnIcon, * fRevealOffIcon; - - (id) initWithCoder: (NSCoder *) decoder { if ((self = [super initWithCoder: decoder])) { - if (!fResumeOnIcon) - fResumeOnIcon = [NSImage imageNamed: @"ResumeOn.png"]; - if (!fResumeOffIcon) - fResumeOffIcon = [NSImage imageNamed: @"ResumeOff.png"]; - if (!fPauseOnIcon) - fPauseOnIcon = [NSImage imageNamed: @"PauseOn.png"]; - if (!fPauseOffIcon) - fPauseOffIcon = [NSImage imageNamed: @"PauseOff.png"]; - if (!fRevealOnIcon) - fRevealOnIcon = [NSImage imageNamed: @"RevealOn.png"]; - if (!fRevealOffIcon) - fRevealOffIcon = [NSImage imageNamed: @"RevealOff.png"]; + fResumeOnIcon = [NSImage imageNamed: @"ResumeOn.png"]; + fResumeOffIcon = [NSImage imageNamed: @"ResumeOff.png"]; + fPauseOnIcon = [NSImage imageNamed: @"PauseOn.png"]; + fPauseOffIcon = [NSImage imageNamed: @"PauseOff.png"]; + fRevealOnIcon = [NSImage imageNamed: @"RevealOn.png"]; + fRevealOffIcon = [NSImage imageNamed: @"RevealOff.png"]; } return self;