diff options
author | stuconnolly <stuart02@gmail.com> | 2010-07-02 16:08:31 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-07-02 16:08:31 +0000 |
commit | acb91a494111b5bae59308533df06fe890a8b2d3 (patch) | |
tree | bbd9aba9040f0fd0a087f9b694f9dc2d03ecbe19 | |
parent | a3690f209a6bd2bccb95da2d7b3e9407cbaa95a8 (diff) | |
download | sequelpro-acb91a494111b5bae59308533df06fe890a8b2d3.tar.gz sequelpro-acb91a494111b5bae59308533df06fe890a8b2d3.tar.bz2 sequelpro-acb91a494111b5bae59308533df06fe890a8b2d3.zip |
When cancelling an export operation, keep the progress sheet on screen until all the export files are removed.
-rw-r--r-- | Source/SPExportController.m | 16 |
1 files changed, 12 insertions, 4 deletions
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]; } |