aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-03-13 23:04:42 +0000
committerstuconnolly <stuart02@gmail.com>2010-03-13 23:04:42 +0000
commitf9dd118cf6e528e121e3ca48f6c7a5cff2c9d10d (patch)
tree6975553838c42b83b3f530c59d1faed0c5e64964 /Source
parentd826eabb4a3716873ab8f3d938896dda5eefbaab (diff)
downloadsequelpro-f9dd118cf6e528e121e3ca48f6c7a5cff2c9d10d.tar.gz
sequelpro-f9dd118cf6e528e121e3ca48f6c7a5cff2c9d10d.tar.bz2
sequelpro-f9dd118cf6e528e121e3ca48f6c7a5cff2c9d10d.zip
Don't attempt to release the print thread at the beginning of a print operation.
Diffstat (limited to 'Source')
-rw-r--r--Source/SPPrintController.m9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/SPPrintController.m b/Source/SPPrintController.m
index 64354076..dd990cad 100644
--- a/Source/SPPrintController.m
+++ b/Source/SPPrintController.m
@@ -71,6 +71,9 @@
NSPrintOperation *op = [NSPrintOperation printOperationWithView:[[[printWebView mainFrame] frameView] documentView] printInfo:printInfo];
+ // Perform the print operation on a background thread
+ [op setCanSpawnSeparateThread:YES];
+
// Add the ability to select the orientation to print panel
NSPrintPanel *printPanel = [op printPanel];
@@ -91,16 +94,14 @@
didRunSelector:nil
contextInfo:nil];
- [self endTask];
+ if ([self isWorking]) [self endTask];
}
/**
* Loads the print document interface. The actual printing is done in the doneLoading delegate.
*/
- (IBAction)printDocument:(id)sender
-{
- if (printThread) [printThread release];
-
+{
[self startTaskWithDescription:NSLocalizedString(@"Generating print document...", @"generating print document status message")];
BOOL isTableInformation = ([tableTabView indexOfTabViewItem:[tableTabView selectedTabViewItem]] == 3);