Changeset 684


Ignore:
Timestamp:
Jul 23, 2006, 9:50:41 PM (15 years ago)
Author:
livings124
Message:

Method parameter isn't really needed.

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.h

    r670 r684  
    180180
    181181- (void) setWindowSizeToFit;
    182 - (NSRect) windowFrameForAmount: (int) amount;
     182- (NSRect) sizedWindowFrame;
    183183
    184184- (void) showMainWindow:    (id) sender;
  • trunk/macosx/Controller.m

    r682 r684  
    21172117- (NSRect) windowWillUseStandardFrame: (NSWindow *) window defaultFrame: (NSRect) defaultFrame
    21182118{
    2119     NSRect frame = [fDefaults boolForKey: @"AutoSize"] ? [window frame]
    2120                     : [self windowFrameForAmount: [fFilteredTorrents count]];
     2119    //if auto size is enabled, the current frame shouldn't need to change
     2120    NSRect frame = [fDefaults boolForKey: @"AutoSize"] ? [window frame] : [self sizedWindowFrame];
    21212121   
    21222122    frame.size.width = [fDefaults boolForKey: @"SmallView"] ? [fWindow minSize].width : WINDOW_REGULAR_WIDTH;
     
    21272127{
    21282128    if ([fDefaults boolForKey: @"AutoSize"])
    2129         [fWindow setFrame: [self windowFrameForAmount: [fFilteredTorrents count]] display: YES animate: YES];
    2130 }
    2131 
    2132 - (NSRect) windowFrameForAmount: (int) amount
     2129        [fWindow setFrame: [self sizedWindowFrame] display: YES animate: YES];
     2130}
     2131
     2132- (NSRect) sizedWindowFrame
    21332133{
    21342134    NSRect frame = [fWindow frame];
    21352135    float newHeight = frame.size.height - [fScrollView frame].size.height
    2136         + amount * ([fTableView rowHeight] + [fTableView intercellSpacing].height);
     2136        + [fFilteredTorrents count] * ([fTableView rowHeight] + [fTableView intercellSpacing].height);
    21372137
    21382138    float minHeight = [fWindow minSize].height;
Note: See TracChangeset for help on using the changeset viewer.