aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPCSVExporterDelegate.m57
-rw-r--r--Source/SPDotExporter.m4
-rw-r--r--Source/SPDotExporterDelegate.m37
-rw-r--r--Source/SPExportController+SharedPrivateAPI.h1
-rw-r--r--Source/SPExportController.m36
-rw-r--r--Source/SPExportFileUtilities.m4
-rw-r--r--Source/SPExportInitializer.h1
-rw-r--r--Source/SPExportInitializer.m29
-rw-r--r--Source/SPHTMLExporterDelegate.m4
-rw-r--r--Source/SPPDFExporterDelegate.m4
-rw-r--r--Source/SPSQLExporter.m3
-rw-r--r--Source/SPSQLExporterDelegate.m21
-rw-r--r--Source/SPXMLExporterDelegate.m52
13 files changed, 127 insertions, 126 deletions
diff --git a/Source/SPCSVExporterDelegate.m b/Source/SPCSVExporterDelegate.m
index e51fe978..38176776 100644
--- a/Source/SPCSVExporterDelegate.m
+++ b/Source/SPCSVExporterDelegate.m
@@ -30,31 +30,31 @@
#import "SPCSVExporter.h"
#import "SPCSVExporterDelegate.h"
-#import "SPDatabaseDocument.h"
#import "SPExportFile.h"
+#import "SPExportInitializer.h"
@implementation SPExportController (SPCSVExporterDelegate)
- (void)csvExportProcessWillBegin:(SPCSVExporter *)exporter
-{
- [[exportProgressText onMainThread] displayIfNeeded];
-
- [[exportProgressIndicator onMainThread] setIndeterminate:YES];
- [[exportProgressIndicator onMainThread] setUsesThreadedAnimation:YES];
- [[exportProgressIndicator onMainThread] startAnimation:self];
-
+{
+ [exportProgressText displayIfNeeded];
+
+ [exportProgressIndicator setIndeterminate:YES];
+ [exportProgressIndicator setUsesThreadedAnimation:YES];
+ [exportProgressIndicator startAnimation:self];
+
// Only update the progress text if this is a table export
if (exportSource == SPTableExport) {
// Update the current table export index
currentTableExportIndex = (exportTableCount - [exporters count]);
-
- [[exportProgressText onMainThread] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Fetching data...", @"export label showing that the app is fetching data for a specific table"), currentTableExportIndex, exportTableCount, [exporter csvTableName]]];
+
+ [exportProgressText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Fetching data...", @"export label showing that the app is fetching data for a specific table"), currentTableExportIndex, exportTableCount, [exporter csvTableName]]];
}
else {
- [[exportProgressText onMainThread] setStringValue:NSLocalizedString(@"Fetching data...", @"export label showing that the app is fetching data")];
+ [exportProgressText setStringValue:NSLocalizedString(@"Fetching data...", @"export label showing that the app is fetching data")];
}
-
- [[exportProgressText onMainThread] displayIfNeeded];
+
+ [exportProgressText displayIfNeeded];
}
- (void)csvExportProcessComplete:(SPCSVExporter *)exporter
@@ -93,15 +93,8 @@
else {
// Close the last exporter's file handle
[[exporter exportOutputFile] close];
-
- [NSApp endSheet:exportProgressWindow returnCode:0];
- [exportProgressWindow orderOut:self];
-
- // Restore query mode
- [tableDocumentInstance setQueryMode:SPInterfaceQueryMode];
-
- // Display Growl notification
- [self displayExportFinishedGrowlNotification];
+
+ [self exportEnded];
}
}
@@ -109,22 +102,22 @@
{
// Only update the progress text if this is a table export
if (exportSource == SPTableExport) {
- [[exportProgressText onMainThread] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Writing data...", @"export label showing app if writing data for a specific table"), currentTableExportIndex, exportTableCount, [exporter csvTableName]]];
+ [exportProgressText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Writing data...", @"export label showing app if writing data for a specific table"), currentTableExportIndex, exportTableCount, [exporter csvTableName]]];
}
else {
- [[exportProgressText onMainThread] setStringValue:NSLocalizedString(@"Writing data...", @"export label showing app is writing data")];
+ [exportProgressText setStringValue:NSLocalizedString(@"Writing data...", @"export label showing app is writing data")];
}
-
- [[exportProgressText onMainThread] displayIfNeeded];
-
- [[exportProgressIndicator onMainThread] stopAnimation:self];
- [[exportProgressIndicator onMainThread] setUsesThreadedAnimation:NO];
- [[exportProgressIndicator onMainThread] setIndeterminate:NO];
- [[exportProgressIndicator onMainThread] setDoubleValue:0];
+
+ [exportProgressText displayIfNeeded];
+
+ [exportProgressIndicator stopAnimation:self];
+ [exportProgressIndicator setUsesThreadedAnimation:NO];
+ [exportProgressIndicator setIndeterminate:NO];
+ [exportProgressIndicator setDoubleValue:0];
}
- (void)csvExportProcessProgressUpdated:(SPCSVExporter *)exporter
-{
+{
[exportProgressIndicator setDoubleValue:[exporter exportProgressValue]];
}
diff --git a/Source/SPDotExporter.m b/Source/SPDotExporter.m
index 5f1dbd42..bb95da6b 100644
--- a/Source/SPDotExporter.m
+++ b/Source/SPDotExporter.m
@@ -28,6 +28,7 @@
//
// More info at <https://github.com/sequelpro/sequelpro>
+#import <SPMySQL/SPMySQL.h>
#import "SPDotExporter.h"
#import "SPFileHandle.h"
#import "SPTableData.h"
@@ -85,6 +86,9 @@
// Mark the process as running
[self setExportProcessIsRunning:YES];
+
+ // we require utf8
+ [connection setEncoding:@"utf8"];
[metaString setString:@"// ************************************************************\n"];
[metaString appendString:@"// Generated by: Sequel Pro\n"];
diff --git a/Source/SPDotExporterDelegate.m b/Source/SPDotExporterDelegate.m
index b5cc4e5e..47054a1e 100644
--- a/Source/SPDotExporterDelegate.m
+++ b/Source/SPDotExporterDelegate.m
@@ -30,33 +30,24 @@
#import "SPDotExporterDelegate.h"
#import "SPDotExporter.h"
-#import "SPDatabaseDocument.h"
+#import "SPExportInitializer.h"
@implementation SPExportController (SPDotExporterDelegate)
- (void)dotExportProcessWillBegin:(SPDotExporter *)exporter
{
- [[exportProgressTitle onMainThread] setStringValue:NSLocalizedString(@"Exporting Dot File", @"text showing that the application is exporting a Dot file")];
- [[exportProgressText onMainThread] setStringValue:NSLocalizedString(@"Dumping...", @"text showing that app is writing dump")];
-
- [[exportProgressTitle onMainThread] displayIfNeeded];
- [[exportProgressText onMainThread] displayIfNeeded];
- [[exportProgressIndicator onMainThread] stopAnimation:self];
- [[exportProgressIndicator onMainThread] setIndeterminate:NO];
+ [exportProgressTitle setStringValue:NSLocalizedString(@"Exporting Dot File", @"text showing that the application is exporting a Dot file")];
+ [exportProgressText setStringValue:NSLocalizedString(@"Dumping...", @"text showing that app is writing dump")];
+
+ [exportProgressTitle displayIfNeeded];
+ [exportProgressText displayIfNeeded];
+ [exportProgressIndicator stopAnimation:self];
+ [exportProgressIndicator setIndeterminate:NO];
}
- (void)dotExportProcessComplete:(SPDotExporter *)exporter
{
- [NSApp endSheet:exportProgressWindow returnCode:0];
- [exportProgressWindow orderOut:self];
-
- [tableDocumentInstance setQueryMode:SPInterfaceQueryMode];
-
- // Restore the connection encoding to it's pre-export value
- [tableDocumentInstance setConnectionEncoding:[NSString stringWithFormat:@"%@%@", previousConnectionEncoding, (previousConnectionEncodingViaLatin1) ? @"-" : @""] reloadingViews:NO];
-
- // Display Growl notification
- [self displayExportFinishedGrowlNotification];
+ [self exportEnded];
}
- (void)dotExportProcessProgressUpdated:(SPDotExporter *)exporter
@@ -76,12 +67,12 @@
- (void)dotExportProcessWillBeginFetchingRelationsData:(SPDotExporter *)exporter
{
- [[exportProgressText onMainThread] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Fetching relations data...", @"export label showing app is fetching relations data for a specific table"), currentTableExportIndex, exportTableCount, [exporter dotExportCurrentTable]]];
+ [exportProgressText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Fetching relations data...", @"export label showing app is fetching relations data for a specific table"), currentTableExportIndex, exportTableCount, [exporter dotExportCurrentTable]]];
- [[exportProgressText onMainThread] displayIfNeeded];
- [[exportProgressIndicator onMainThread] setIndeterminate:YES];
- [[exportProgressIndicator onMainThread] setUsesThreadedAnimation:YES];
- [[exportProgressIndicator onMainThread] startAnimation:self];
+ [exportProgressText displayIfNeeded];
+ [exportProgressIndicator setIndeterminate:YES];
+ [exportProgressIndicator setUsesThreadedAnimation:YES];
+ [exportProgressIndicator startAnimation:self];
}
@end
diff --git a/Source/SPExportController+SharedPrivateAPI.h b/Source/SPExportController+SharedPrivateAPI.h
index 067c4645..d8382824 100644
--- a/Source/SPExportController+SharedPrivateAPI.h
+++ b/Source/SPExportController+SharedPrivateAPI.h
@@ -32,4 +32,5 @@
@interface SPExportController (SharedPrivateAPI)
- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
+- (void)_hideExportProgress;
@end
diff --git a/Source/SPExportController.m b/Source/SPExportController.m
index f5730da2..0cccabb5 100644
--- a/Source/SPExportController.m
+++ b/Source/SPExportController.m
@@ -72,8 +72,8 @@ static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled";
- (void)_resizeWindowForCustomFilenameViewByHeightDelta:(NSInteger)delta;
- (void)_resizeWindowForAdvancedOptionsViewByHeightDelta:(NSInteger)delta;
-- (void)_waitUntilQueueIsEmpty:(id)sender;
-- (void)_queueIsEmpty:(id)sender;
+- (void)_waitUntilQueueIsEmptyAfterCancelling:(id)sender;
+- (void)_queueIsEmptyAfterCancelling:(id)sender;
@end
@@ -415,18 +415,18 @@ set_input:
// Cancel all of the currently running operations
[operationQueue cancelAllOperations]; // async call
- [NSThread detachNewThreadWithName:SPCtxt(@"SPExportController cancelExport: waiting for empty queue", tableDocumentInstance) target:self selector:@selector(_waitUntilQueueIsEmpty:) object:sender];
+ [NSThread detachNewThreadWithName:SPCtxt(@"SPExportController cancelExport: waiting for empty queue", tableDocumentInstance) target:self selector:@selector(_waitUntilQueueIsEmptyAfterCancelling:) object:sender];
}
-- (void)_waitUntilQueueIsEmpty:(id)sender
+- (void)_waitUntilQueueIsEmptyAfterCancelling:(id)sender
{
[sender retain];
[operationQueue waitUntilAllOperationsAreFinished];
- [self performSelectorOnMainThread:@selector(_queueIsEmpty:) withObject:sender waitUntilDone:NO];
+ [self performSelectorOnMainThread:@selector(_queueIsEmptyAfterCancelling:) withObject:sender waitUntilDone:NO];
[sender release];
}
-- (void)_queueIsEmpty:(id)sender
+- (void)_queueIsEmptyAfterCancelling:(id)sender
{
// Loop the cached export file paths and remove them from disk if they exist
for (SPExportFile *file in exportFiles)
@@ -434,14 +434,11 @@ set_input:
[file delete];
}
- // Close the progress sheet
- [NSApp endSheet:exportProgressWindow returnCode:0];
- [exportProgressWindow orderOut:self];
-
- // Stop the progress indicator
- [exportProgressIndicator stopAnimation:self];
- [exportProgressIndicator setUsesThreadedAnimation:NO];
-
+ [self _hideExportProgress];
+
+ // Restore the connection encoding to it's pre-export value
+ [tableDocumentInstance setConnectionEncoding:[NSString stringWithFormat:@"%@%@", previousConnectionEncoding, (previousConnectionEncodingViaLatin1) ? @"-" : @""] reloadingViews:NO];
+
// Re-enable the cancel button for future exports
[sender setEnabled:YES];
@@ -450,6 +447,17 @@ set_input:
[exporters removeAllObjects];
}
+- (void)_hideExportProgress
+{
+ // Close the progress sheet
+ [NSApp endSheet:exportProgressWindow returnCode:0];
+ [exportProgressWindow orderOut:self];
+
+ // Stop the progress indicator
+ [exportProgressIndicator stopAnimation:self];
+ [exportProgressIndicator setUsesThreadedAnimation:NO];
+}
+
/**
* Opens the open panel when user selects to change the output path.
*/
diff --git a/Source/SPExportFileUtilities.m b/Source/SPExportFileUtilities.m
index b3a6cc3c..23fb2f4a 100644
--- a/Source/SPExportFileUtilities.m
+++ b/Source/SPExportFileUtilities.m
@@ -269,9 +269,7 @@ SPExportErrorChoice;
}
}
- // Close the progress sheet
- [NSApp endSheet:exportProgressWindow returnCode:0];
- [exportProgressWindow orderOut:self];
+ [self _hideExportProgress];
[alert beginSheetModalForWindow:[tableDocumentInstance parentWindow] modalDelegate:self didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:files];
[alert autorelease];
diff --git a/Source/SPExportInitializer.h b/Source/SPExportInitializer.h
index d6fc269d..e8cfec73 100644
--- a/Source/SPExportInitializer.h
+++ b/Source/SPExportInitializer.h
@@ -43,6 +43,7 @@
@interface SPExportController (SPExportInitializer)
- (void)startExport;
+- (void)exportEnded;
- (void)initializeExportUsingSelectedOptions;
- (void)exportTables:(NSArray *)exportTables orDataArray:(NSArray *)dataArray;
diff --git a/Source/SPExportInitializer.m b/Source/SPExportInitializer.m
index 045e5046..15e9de66 100644
--- a/Source/SPExportInitializer.m
+++ b/Source/SPExportInitializer.m
@@ -46,6 +46,7 @@
#import "SPExportFilenameUtilities.h"
#import "SPExportFileNameTokenObject.h"
#import "SPConnectionControllerDelegateProtocol.h"
+#import "SPExportController+SharedPrivateAPI.h"
#import <SPMySQL/SPMySQL.h>
@@ -74,14 +75,9 @@
contextInfo:nil];
}
- // If using an export type that requires the connection to start in UTF8, cache the current connection
- // encoding and then set it here.
- if (exportType == SPSQLExport || exportType == SPDotExport) {
- previousConnectionEncoding = [[NSString alloc] initWithString:[connection encoding]];
- previousConnectionEncodingViaLatin1 = [connection encodingUsesLatin1Transport];
-
- [tableDocumentInstance setConnectionEncoding:@"utf8" reloadingViews:NO];
- }
+ // cache the current connection encoding so the exporter can do what it wants.
+ previousConnectionEncoding = [[NSString alloc] initWithString:[connection encoding]];
+ previousConnectionEncodingViaLatin1 = [connection encodingUsesLatin1Transport];
// Add the first exporter to the operation queue
[operationQueue addOperation:[exporters objectAtIndex:0]];
@@ -92,6 +88,23 @@
}
/**
+ * @see _queueIsEmptyAfterCancelling:
+ */
+- (void)exportEnded
+{
+ [self _hideExportProgress];
+
+ // Restore query mode
+ [tableDocumentInstance setQueryMode:SPInterfaceQueryMode];
+
+ // Display Growl notification
+ [self displayExportFinishedGrowlNotification];
+
+ // Restore the connection encoding to it's pre-export value
+ [tableDocumentInstance setConnectionEncoding:[NSString stringWithFormat:@"%@%@", previousConnectionEncoding, (previousConnectionEncodingViaLatin1) ? @"-" : @""] reloadingViews:NO];
+}
+
+/**
* Initializes the export process by analysing the selected criteria.
*/
- (void)initializeExportUsingSelectedOptions
diff --git a/Source/SPHTMLExporterDelegate.m b/Source/SPHTMLExporterDelegate.m
index 5850849d..0d69f651 100644
--- a/Source/SPHTMLExporterDelegate.m
+++ b/Source/SPHTMLExporterDelegate.m
@@ -29,6 +29,7 @@
// More info at <https://github.com/sequelpro/sequelpro>
#import "SPHTMLExporterDelegate.h"
+#import "SPExportInitializer.h"
@implementation SPExportController (SPHTMLExporterDelegate)
@@ -37,7 +38,8 @@
}
- (void)htmlExportProcessComplete:(SPHTMLExporter *)exporter
-{
+{
+ [self exportEnded];
}
- (void)htmlExportProcessWillBeginWritingData:(SPHTMLExporter *)exporter
diff --git a/Source/SPPDFExporterDelegate.m b/Source/SPPDFExporterDelegate.m
index 017c17f3..b6b6eef7 100644
--- a/Source/SPPDFExporterDelegate.m
+++ b/Source/SPPDFExporterDelegate.m
@@ -29,6 +29,7 @@
// More info at <https://github.com/sequelpro/sequelpro>
#import "SPPDFExporterDelegate.h"
+#import "SPExportInitializer.h"
@implementation SPExportController (SPPDFExporterDelegate)
@@ -37,7 +38,8 @@
}
- (void)pdfExportProcessComplete:(SPPDFExporter *)exporter
-{
+{
+ [self exportEnded];
}
- (void)pdfExportProcessWillBeginWritingData:(SPPDFExporter *)exporter
diff --git a/Source/SPSQLExporter.m b/Source/SPSQLExporter.m
index 5fcaae26..c575156d 100644
--- a/Source/SPSQLExporter.m
+++ b/Source/SPSQLExporter.m
@@ -174,6 +174,9 @@
if ([self sqlOutputIncludeUTF8BOM]) {
[metaString appendString:@"\xef\xbb\xbf"];
}
+
+ // we require utf8
+ [connection setEncoding:@"utf8"];
// Add the dump header to the dump file
[metaString appendString:@"# ************************************************************\n"];
diff --git a/Source/SPSQLExporterDelegate.m b/Source/SPSQLExporterDelegate.m
index c450c42a..09e87cf8 100644
--- a/Source/SPSQLExporterDelegate.m
+++ b/Source/SPSQLExporterDelegate.m
@@ -31,31 +31,22 @@
#import "SPSQLExporterDelegate.h"
#import "SPSQLExporter.h"
#import "SPDatabaseDocument.h"
+#import "SPExportInitializer.h"
@implementation SPExportController (SPSQLExporterDelegate)
- (void)sqlExportProcessWillBegin:(SPSQLExporter *)exporter
{
- [[exportProgressTitle onMainThread] setStringValue:NSLocalizedString(@"Exporting SQL", @"text showing that the application is exporting SQL")];
- [[exportProgressText onMainThread] setStringValue:NSLocalizedString(@"Dumping...", @"text showing that app is writing dump")];
+ [exportProgressTitle setStringValue:NSLocalizedString(@"Exporting SQL", @"text showing that the application is exporting SQL")];
+ [exportProgressText setStringValue:NSLocalizedString(@"Dumping...", @"text showing that app is writing dump")];
- [[exportProgressTitle onMainThread] displayIfNeeded];
- [[exportProgressText onMainThread] displayIfNeeded];
+ [exportProgressTitle displayIfNeeded];
+ [exportProgressText displayIfNeeded];
}
- (void)sqlExportProcessComplete:(SPSQLExporter *)exporter
{
- [exportProgressIndicator stopAnimation:self];
- [NSApp endSheet:exportProgressWindow returnCode:0];
- [exportProgressWindow orderOut:self];
-
- [tableDocumentInstance setQueryMode:SPInterfaceQueryMode];
-
- // Restore the connection encoding to it's pre-export value
- [tableDocumentInstance setConnectionEncoding:[NSString stringWithFormat:@"%@%@", previousConnectionEncoding, (previousConnectionEncodingViaLatin1) ? @"-" : @""] reloadingViews:NO];
-
- // Display Growl notification
- [self displayExportFinishedGrowlNotification];
+ [self exportEnded];
// Check for errors and display the errors sheet if necessary
if ([exporter didExportErrorsOccur]) {
diff --git a/Source/SPXMLExporterDelegate.m b/Source/SPXMLExporterDelegate.m
index c414d195..80d5d0ca 100644
--- a/Source/SPXMLExporterDelegate.m
+++ b/Source/SPXMLExporterDelegate.m
@@ -32,6 +32,7 @@
#import "SPXMLExporter.h"
#import "SPDatabaseDocument.h"
#import "SPExportFile.h"
+#import "SPExportInitializer.h"
#import <SPMySQL/SPMySQL.h>
@@ -39,25 +40,25 @@
- (void)xmlExportProcessWillBegin:(SPXMLExporter *)exporter
{
- [[exportProgressText onMainThread] displayIfNeeded];
-
- [[exportProgressIndicator onMainThread] setIndeterminate:YES];
- [[exportProgressIndicator onMainThread] setUsesThreadedAnimation:YES];
- [[exportProgressIndicator onMainThread] startAnimation:self];
-
+ [exportProgressText displayIfNeeded];
+
+ [exportProgressIndicator setIndeterminate:YES];
+ [exportProgressIndicator setUsesThreadedAnimation:YES];
+ [exportProgressIndicator startAnimation:self];
+
// Only update the progress text if this is a table export
if (exportSource == SPTableExport) {
-
+
// Update the current table export index
currentTableExportIndex = (exportTableCount - [exporters count]);
-
- [[exportProgressText onMainThread] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Fetching data...", @"export label showing that the app is fetching data for a specific table"), currentTableExportIndex, exportTableCount, [exporter xmlTableName]]];
+
+ [exportProgressText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Fetching data...", @"export label showing that the app is fetching data for a specific table"), currentTableExportIndex, exportTableCount, [exporter xmlTableName]]];
}
else {
- [[exportProgressText onMainThread] setStringValue:NSLocalizedString(@"Fetching data...", @"export label showing that the app is fetching data")];
+ [exportProgressText setStringValue:NSLocalizedString(@"Fetching data...", @"export label showing that the app is fetching data")];
}
-
- [[exportProgressText onMainThread] displayIfNeeded];
+
+ [exportProgressText displayIfNeeded];
}
- (void)xmlExportProcessComplete:(SPXMLExporter *)exporter
@@ -103,14 +104,7 @@
[[exporter exportOutputFile] writeData:[string dataUsingEncoding:[connection stringEncoding]]];
[[exporter exportOutputFile] close];
- [NSApp endSheet:exportProgressWindow returnCode:0];
- [exportProgressWindow orderOut:self];
-
- // Restore query mode
- [tableDocumentInstance setQueryMode:SPInterfaceQueryMode];
-
- // Display Growl notification
- [self displayExportFinishedGrowlNotification];
+ [self exportEnded];
}
}
@@ -123,18 +117,18 @@
{
// Only update the progress text if this is a table export
if (exportSource == SPTableExport) {
- [[exportProgressText onMainThread] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Writing data...", @"export label showing app if writing data for a specific table"), currentTableExportIndex, exportTableCount, [exporter xmlTableName]]];
+ [exportProgressText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Writing data...", @"export label showing app if writing data for a specific table"), currentTableExportIndex, exportTableCount, [exporter xmlTableName]]];
}
else {
- [[exportProgressText onMainThread] setStringValue:NSLocalizedString(@"Writing data...", @"export label showing app is writing data")];
+ [exportProgressText setStringValue:NSLocalizedString(@"Writing data...", @"export label showing app is writing data")];
}
-
- [[exportProgressText onMainThread] displayIfNeeded];
-
- [[exportProgressIndicator onMainThread] stopAnimation:self];
- [[exportProgressIndicator onMainThread] setUsesThreadedAnimation:NO];
- [[exportProgressIndicator onMainThread] setIndeterminate:NO];
- [[exportProgressIndicator onMainThread] setDoubleValue:0];
+
+ [exportProgressText displayIfNeeded];
+
+ [exportProgressIndicator stopAnimation:self];
+ [exportProgressIndicator setUsesThreadedAnimation:NO];
+ [exportProgressIndicator setIndeterminate:NO];
+ [exportProgressIndicator setDoubleValue:0];
}
@end