mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
animate quit window's progress bar in a different thread
This commit is contained in:
@@ -463,7 +463,7 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
||||
return NSTerminateLater;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return NSTerminateNow;
|
||||
}
|
||||
|
||||
@@ -516,6 +516,10 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
||||
[self showStatusBar: NO animate: NO];
|
||||
[self showFilterBar: NO animate: NO];
|
||||
|
||||
//show quit window
|
||||
QuittingWindowController * quitController = [[QuittingWindowController alloc] init];
|
||||
[quitController showWindow: self];
|
||||
|
||||
//save history
|
||||
[self updateTorrentHistory];
|
||||
|
||||
@@ -525,8 +529,6 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
||||
//clear badge
|
||||
[fBadger clearBadge];
|
||||
|
||||
[[[QuittingWindowController alloc] init] showWindow: self];
|
||||
|
||||
//remaining calls the same as dealloc
|
||||
[fInfoController release];
|
||||
[fMessageController release];
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
[fMessageField setStringValue: [NSLocalizedString(@"Shutting Down", "Quitting Window -> message") stringByAppendingEllipsis]];
|
||||
|
||||
[fProgressBar setUsesThreadedAnimation: YES];
|
||||
[fProgressBar startAnimation: nil];
|
||||
|
||||
[[self window] center];
|
||||
|
||||
Reference in New Issue
Block a user