E_COMMERCE Acqlite 0.3 still prevents shutdown and restarts from occurring properly if it's running at the time. I made the following changes to the 0.29 code that resolved it: // me: Added replyToApplicationShouldTerminate, removed startShutdown (no longer needed here) - (void) sheetDidDismiss: (NSWindow*)sheet returnCode: (int)returnCode contextInfo: (void*)contextInfo; if (returnCode == NSAlertDefaultReturn) [NSApp replyToApplicationShouldTerminate: YES]; [NSApp replyToApplicationShouldTerminate: NO]; AqApplicationController.m // me: Moved startShutdown to applicationWillTerminate, improved NSApplicationTerminateReply usage - (NSApplicationTerminateReply) applicationShouldTerminate: (id) sender; if ([[AqCoreController instance] coreWasTerminated]) return NSTerminateNow; if (![[AqCoreController instance] coreWasLaunched]) return NSTerminateCancel; if ([[AqDownloadsController instance] active] && [defaults boolForKey: @"kAqWarnQuit"]) [self warnQuit: nil modalDelegate: self]; - (void) applicationWillTerminate: (id) notification; [self updateDockIcon: NO]; if ([AqSidebarController instance]) [[AqSidebarController instance]->window saveFrameUsingName: @"kAqMainWindow"]; [[AqQueryController instance] applicationWillTerminate]; [[AqSidebarController instance] applicationWillTerminate]; [[AqFilterController instance] applicationWillTerminate]; [[AqContentViewController instance] applicationWillTerminate]; /* show shutdown panel */ if ([self isOS103OrHigher]) [[AqSidebarController instance]->window makeKeyAndOrderFront: self]; [shutdownProgress setUsesThreadedAnimation: YES]; [shutdownProgress startAnimation: nil]; [NSApp beginSheet: shutdownPanel modalForWindow: [AqSidebarController instance]->window [shutdownProgress setUsesThreadedAnimation: YES]; [shutdownProgress startAnimation: nil]; [shutdownPanel setTitle: @""]; [shutdownPanel makeKeyAndOrderFront: self]; // me: How can we wait for this to finish before quitting? [AqCoreController writeString: @"shutdown\n"]; |