Don't disable green zoom button because showing a sheet automatically enables it. Oh well...
This commit is contained in:
parent
8e0ff693f2
commit
761a3928d4
|
@ -350,7 +350,7 @@ static void sleepCallBack(void * controller, io_service_t y,
|
||||||
if ([fDefaults boolForKey: @"InfoVisible"])
|
if ([fDefaults boolForKey: @"InfoVisible"])
|
||||||
[self showInfo: nil];
|
[self showInfo: nil];
|
||||||
|
|
||||||
//must do after everything is set up
|
//must do after everything else is set up
|
||||||
[self checkAutoImportDirectory: nil];
|
[self checkAutoImportDirectory: nil];
|
||||||
fAutoImportTimer = [NSTimer scheduledTimerWithTimeInterval: 15.0 target: self
|
fAutoImportTimer = [NSTimer scheduledTimerWithTimeInterval: 15.0 target: self
|
||||||
selector: @selector(checkAutoImportDirectory:) userInfo: nil repeats: YES];
|
selector: @selector(checkAutoImportDirectory:) userInfo: nil repeats: YES];
|
||||||
|
@ -387,8 +387,7 @@ static void sleepCallBack(void * controller, io_service_t y,
|
||||||
@"There are %d active transfers. Do you really want to quit?", active];
|
@"There are %d active transfers. Do you really want to quit?", active];
|
||||||
|
|
||||||
NSBeginAlertSheet(@"Confirm Quit", @"Quit", @"Cancel", nil, fWindow, self,
|
NSBeginAlertSheet(@"Confirm Quit", @"Quit", @"Cancel", nil, fWindow, self,
|
||||||
@selector(quitSheetDidEnd:returnCode:contextInfo:),
|
@selector(quitSheetDidEnd:returnCode:contextInfo:), nil, nil, message);
|
||||||
nil, nil, message);
|
|
||||||
return NSTerminateLater;
|
return NSTerminateLater;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -396,10 +395,8 @@ static void sleepCallBack(void * controller, io_service_t y,
|
||||||
return NSTerminateNow;
|
return NSTerminateNow;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) quitSheetDidEnd: (NSWindow *) sheet returnCode: (int) returnCode
|
- (void) quitSheetDidEnd: (NSWindow *) sheet returnCode: (int) returnCode contextInfo: (void *) contextInfo
|
||||||
contextInfo: (void *) contextInfo
|
|
||||||
{
|
{
|
||||||
[NSApp stopModal];
|
|
||||||
[NSApp replyToApplicationShouldTerminate: returnCode == NSAlertDefaultReturn];
|
[NSApp replyToApplicationShouldTerminate: returnCode == NSAlertDefaultReturn];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -905,8 +902,7 @@ static void sleepCallBack(void * controller, io_service_t y,
|
||||||
[fInfoController updateInfoStats];
|
[fInfoController updateInfoStats];
|
||||||
|
|
||||||
//badge dock
|
//badge dock
|
||||||
[fBadger updateBadgeWithCompleted: fCompleted
|
[fBadger updateBadgeWithCompleted: fCompleted uploadRate: uploadRate downloadRate: downloadRate];
|
||||||
uploadRate: uploadRate downloadRate: downloadRate];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) updateTorrentHistory
|
- (void) updateTorrentHistory
|
||||||
|
@ -2121,10 +2117,16 @@ static void sleepCallBack(void * controller, io_service_t y,
|
||||||
|
|
||||||
- (void) setAutoSize: (NSNotification *) notification
|
- (void) setAutoSize: (NSNotification *) notification
|
||||||
{
|
{
|
||||||
[[fWindow standardWindowButton: NSWindowZoomButton] setEnabled: ![fDefaults boolForKey: @"AutoSize"]];
|
#warning will not work because of sheets
|
||||||
|
//[[fWindow standardWindowButton: NSWindowZoomButton] setEnabled: ![fDefaults boolForKey: @"AutoSize"]];
|
||||||
[self setWindowSizeToFit];
|
[self setWindowSizeToFit];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL) windowShouldZoom: (NSWindow *) sender toFrame: (NSRect) newFrame
|
||||||
|
{
|
||||||
|
return ![fDefaults boolForKey: @"AutoSize"];
|
||||||
|
}
|
||||||
|
|
||||||
- (void) setWindowSizeToFit
|
- (void) setWindowSizeToFit
|
||||||
{
|
{
|
||||||
if ([fDefaults boolForKey: @"AutoSize"])
|
if ([fDefaults boolForKey: @"AutoSize"])
|
||||||
|
|
Loading…
Reference in New Issue