From acb91a494111b5bae59308533df06fe890a8b2d3 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Fri, 2 Jul 2010 16:08:31 +0000 Subject: When cancelling an export operation, keep the progress sheet on screen until all the export files are removed. --- Source/SPExportController.m | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'Source/SPExportController.m') diff --git a/Source/SPExportController.m b/Source/SPExportController.m index 49e67536..09c8d4d7 100644 --- a/Source/SPExportController.m +++ b/Source/SPExportController.m @@ -381,6 +381,10 @@ { [self setExportCancelled:YES]; + [exportProgressIndicator setIndeterminate:YES]; + [exportProgressIndicator setUsesThreadedAnimation:YES]; + [exportProgressIndicator startAnimation:self]; + [exportProgressTitle setStringValue:NSLocalizedString(@"Cancelling...", @"cancelling task status message")]; [exportProgressText setStringValue:NSLocalizedString(@"Cleaning up...", @"cancelling export cleaning up message")]; @@ -390,10 +394,6 @@ // Cancel all of the currently running operations [operationQueue cancelAllOperations]; - // Close the progress sheet - [NSApp endSheet:exportProgressWindow returnCode:0]; - [exportProgressWindow orderOut:self]; - // Loop the cached export file paths and remove them from disk if they exist NSFileManager *fileManager = [NSFileManager defaultManager]; @@ -404,6 +404,14 @@ } } + // Close the progress sheet + [NSApp endSheet:exportProgressWindow returnCode:0]; + [exportProgressWindow orderOut:self]; + + // Stop the progress indicator + [exportProgressIndicator stopAnimation:self]; + [exportProgressIndicator setUsesThreadedAnimation:NO]; + // Re-enable the cancel button for future exports [sender setEnabled:YES]; } -- cgit v1.2.3