Method parameter isn't really needed.

This commit is contained in:
Mitchell Livingston 2006-07-23 21:50:41 +00:00
parent f2ffb6698b
commit 8c3e4f9337
2 changed files with 6 additions and 6 deletions

View File

@ -179,7 +179,7 @@
- (void) toggleAdvancedBar: (id) sender;
- (void) setWindowSizeToFit;
- (NSRect) windowFrameForAmount: (int) amount;
- (NSRect) sizedWindowFrame;
- (void) showMainWindow: (id) sender;
- (void) linkHomepage: (id) sender;

View File

@ -2116,8 +2116,8 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
- (NSRect) windowWillUseStandardFrame: (NSWindow *) window defaultFrame: (NSRect) defaultFrame
{
NSRect frame = [fDefaults boolForKey: @"AutoSize"] ? [window frame]
: [self windowFrameForAmount: [fFilteredTorrents count]];
//if auto size is enabled, the current frame shouldn't need to change
NSRect frame = [fDefaults boolForKey: @"AutoSize"] ? [window frame] : [self sizedWindowFrame];
frame.size.width = [fDefaults boolForKey: @"SmallView"] ? [fWindow minSize].width : WINDOW_REGULAR_WIDTH;
return frame;
@ -2126,14 +2126,14 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
- (void) setWindowSizeToFit
{
if ([fDefaults boolForKey: @"AutoSize"])
[fWindow setFrame: [self windowFrameForAmount: [fFilteredTorrents count]] display: YES animate: YES];
[fWindow setFrame: [self sizedWindowFrame] display: YES animate: YES];
}
- (NSRect) windowFrameForAmount: (int) amount
- (NSRect) sizedWindowFrame
{
NSRect frame = [fWindow frame];
float newHeight = frame.size.height - [fScrollView frame].size.height
+ amount * ([fTableView rowHeight] + [fTableView intercellSpacing].height);
+ [fFilteredTorrents count] * ([fTableView rowHeight] + [fTableView intercellSpacing].height);
float minHeight = [fWindow minSize].height;
if (newHeight < minHeight)