Disable the zoom button if auto resize is enabled.
This commit is contained in:
parent
8226ef9d50
commit
777968a524
|
@ -178,6 +178,7 @@
|
|||
|
||||
- (void) toggleAdvancedBar: (id) sender;
|
||||
|
||||
- (void) setAutoSize: (NSNotification *) notification;
|
||||
- (void) setWindowSizeToFit;
|
||||
- (NSRect) windowFrameFor: (int) count;
|
||||
|
||||
|
|
|
@ -309,7 +309,7 @@ static void sleepCallBack(void * controller, io_service_t y,
|
|||
[nc addObserver: self selector: @selector(autoImportChange:)
|
||||
name: @"AutoImportSettingChange" object: nil];
|
||||
|
||||
[nc addObserver: self selector: @selector(setWindowSizeToFit)
|
||||
[nc addObserver: self selector: @selector(setAutoSize:)
|
||||
name: @"AutoSizeSettingChange" object: nil];
|
||||
|
||||
//check to start another because of stopped torrent
|
||||
|
@ -349,7 +349,7 @@ static void sleepCallBack(void * controller, io_service_t y,
|
|||
[[NSRunLoop currentRunLoop] addTimer: fAutoImportTimer forMode: NSDefaultRunLoopMode];
|
||||
|
||||
[self applyFilter: nil];
|
||||
[self setWindowSizeToFit];
|
||||
[self setAutoSize: nil];
|
||||
|
||||
[fWindow makeKeyAndOrderFront: nil];
|
||||
|
||||
|
@ -2120,13 +2120,15 @@ static void sleepCallBack(void * controller, io_service_t y,
|
|||
|
||||
- (NSRect) windowWillUseStandardFrame: (NSWindow *) window defaultFrame: (NSRect) defaultFrame
|
||||
{
|
||||
//don't resize if set to auto size
|
||||
if ([fDefaults boolForKey: @"AutoSize"])
|
||||
return [fWindow frame];
|
||||
|
||||
return [self windowFrameFor: [fFilteredTorrents count]];
|
||||
}
|
||||
|
||||
- (void) setAutoSize: (NSNotification *) notification
|
||||
{
|
||||
[[fWindow standardWindowButton: NSWindowZoomButton] setEnabled: ![fDefaults boolForKey: @"AutoSize"]];
|
||||
[self setWindowSizeToFit];
|
||||
}
|
||||
|
||||
- (void) setWindowSizeToFit
|
||||
{
|
||||
if ([fDefaults boolForKey: @"AutoSize"])
|
||||
|
|
Loading…
Reference in New Issue