Changeset 659


Ignore:
Timestamp:
Jul 22, 2006, 6:02:48 PM (16 years ago)
Author:
livings124
Message:

Disable the zoom button if auto resize is enabled.

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.h

    r657 r659  
    179179- (void) toggleAdvancedBar: (id) sender;
    180180
     181- (void) setAutoSize: (NSNotification *) notification;
    181182- (void) setWindowSizeToFit;
    182183- (NSRect) windowFrameFor: (int) count;
  • trunk/macosx/Controller.m

    r658 r659  
    310310                    name: @"AutoImportSettingChange" object: nil];
    311311   
    312     [nc addObserver: self selector: @selector(setWindowSizeToFit)
     312    [nc addObserver: self selector: @selector(setAutoSize:)
    313313                    name: @"AutoSizeSettingChange" object: nil];
    314314   
     
    350350   
    351351    [self applyFilter: nil];
    352     [self setWindowSizeToFit];
     352    [self setAutoSize: nil];
    353353   
    354354    [fWindow makeKeyAndOrderFront: nil];
     
    21212121- (NSRect) windowWillUseStandardFrame: (NSWindow *) window defaultFrame: (NSRect) defaultFrame
    21222122{
    2123     //don't resize if set to auto size
    2124     if ([fDefaults boolForKey: @"AutoSize"])
    2125         return [fWindow frame];
    2126 
    21272123    return [self windowFrameFor: [fFilteredTorrents count]];
     2124}
     2125
     2126- (void) setAutoSize: (NSNotification *) notification
     2127{
     2128    [[fWindow standardWindowButton: NSWindowZoomButton] setEnabled: ![fDefaults boolForKey: @"AutoSize"]];
     2129    [self setWindowSizeToFit];
    21282130}
    21292131
Note: See TracChangeset for help on using the changeset viewer.