From a067ed6dda5fc23cb104bca9b265e1e654429b03 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Thu, 22 Jun 2006 02:51:59 +0000 Subject: [PATCH] Might as well get this small change in. --- macosx/InfoWindowController.h | 3 ++- macosx/InfoWindowController.m | 17 +++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/macosx/InfoWindowController.h b/macosx/InfoWindowController.h index 63dae1c6c..b19be4514 100644 --- a/macosx/InfoWindowController.h +++ b/macosx/InfoWindowController.h @@ -27,7 +27,8 @@ @interface InfoWindowController : NSWindowController { - NSMutableArray * fTorrents, * fFiles; + NSArray * fTorrents; + NSMutableArray * fFiles; NSImage * fAppIcon; IBOutlet NSTabView * fTabView; diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index c0aa36fc5..1f211212e 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -55,6 +55,7 @@ { fAppIcon = [[NSApp applicationIconImage] copy]; + fTorrents = [[NSArray alloc] init]; fFiles = [[NSMutableArray alloc] initWithCapacity: 6]; [fFileTable setDoubleAction: @selector(revealFile:)]; @@ -73,8 +74,7 @@ - (void) dealloc { - if (fTorrents) - [fTorrents release]; + [fTorrents release]; [fFiles release]; [fAppIcon release]; @@ -83,8 +83,7 @@ - (void) updateInfoForTorrents: (NSArray *) torrents { - if (fTorrents) - [fTorrents release]; + [fTorrents release]; fTorrents = [torrents retain]; int numberSelected = [fTorrents count]; @@ -314,8 +313,7 @@ - (NSRect) windowWillUseStandardFrame: (NSWindow *) window defaultFrame: (NSRect) defaultFrame { NSRect windowRect = [window frame]; - windowRect.size.width = [window minSize].width; - + windowRect.size.width = [window minSize].width; return windowRect; } @@ -328,11 +326,7 @@ - (void) setWindowForTab: (NSString *) identifier animate: (BOOL) animate { - NSWindow * window = [self window]; - NSRect frame = [window frame]; - float height; - if ([identifier isEqualToString: TAB_ACTIVITY_IDENT]) height = TAB_ACTIVITY_HEIGHT; else if ([identifier isEqualToString: TAB_OPTIONS_IDENT]) @@ -342,7 +336,10 @@ else height = TAB_INFO_HEIGHT; + NSWindow * window = [self window]; + NSRect frame = [window frame]; NSView * view = [[fTabView selectedTabViewItem] view]; + float difference = height - [view frame].size.height; frame.origin.y -= difference; frame.size.height += difference;