animate quit window's progress bar in a different thread

This commit is contained in:
Mitchell Livingston
2007-11-29 01:44:33 +00:00
parent 7a9e5c8109
commit aa9b21386e
2 changed files with 7 additions and 3 deletions

View File

@@ -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];

View File

@@ -35,6 +35,8 @@
- (void) awakeFromNib
{
[fMessageField setStringValue: [NSLocalizedString(@"Shutting Down", "Quitting Window -> message") stringByAppendingEllipsis]];
[fProgressBar setUsesThreadedAnimation: YES];
[fProgressBar startAnimation: nil];
[[self window] center];