aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-05-25 08:20:29 +0000
committerstuconnolly <stuart02@gmail.com>2012-05-25 08:20:29 +0000
commiteb65e7845ea93a0200b304bd63f88415762fa29a (patch)
tree60d5d9a5d213b7ed42c58142a6e08fc062a2c4f5 /Source
parent687d564c85cefca3d378fed7be6c40f30b6b55b6 (diff)
downloadsequelpro-eb65e7845ea93a0200b304bd63f88415762fa29a.tar.gz
sequelpro-eb65e7845ea93a0200b304bd63f88415762fa29a.tar.bz2
sequelpro-eb65e7845ea93a0200b304bd63f88415762fa29a.zip
Export tidy up.
Diffstat (limited to 'Source')
-rw-r--r--Source/SPCSVExporterDelegate.m14
-rw-r--r--Source/SPDotExporterDelegate.m17
-rw-r--r--Source/SPExportController.h4
-rw-r--r--Source/SPExportController.m4
-rw-r--r--Source/SPExportFile.h1
-rw-r--r--Source/SPExportInitializer.m12
-rw-r--r--Source/SPExporter.h1
-rw-r--r--Source/SPHTMLExporterDelegate.m18
-rw-r--r--Source/SPPDFExporterDelegate.m16
-rw-r--r--Source/SPSQLExporterDelegate.m18
-rw-r--r--Source/SPXMLExporterDelegate.m13
11 files changed, 20 insertions, 98 deletions
diff --git a/Source/SPCSVExporterDelegate.m b/Source/SPCSVExporterDelegate.m
index 6f8e06f6..019152b5 100644
--- a/Source/SPCSVExporterDelegate.m
+++ b/Source/SPCSVExporterDelegate.m
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
#import "SPCSVExporter.h"
#import "SPCSVExporterDelegate.h"
#import "SPDatabaseDocument.h"
@@ -32,9 +30,6 @@
@implementation SPExportController (SPCSVExporterDelegate)
-/**
- *
- */
- (void)csvExportProcessWillBegin:(SPCSVExporter *)exporter
{
[[exportProgressText onMainThread] displayIfNeeded];
@@ -57,9 +52,6 @@
[[exportProgressText onMainThread] displayIfNeeded];
}
-/**
- *
- */
- (void)csvExportProcessComplete:(SPCSVExporter *)exporter
{
NSUInteger exportCount = [exporters count];
@@ -108,9 +100,6 @@
}
}
-/**
- *
- */
- (void)csvExportProcessWillBeginWritingData:(SPCSVExporter *)exporter
{
// Only update the progress text if this is a table export
@@ -129,9 +118,6 @@
[[exportProgressIndicator onMainThread] setDoubleValue:0];
}
-/**
- *
- */
- (void)csvExportProcessProgressUpdated:(SPCSVExporter *)exporter
{
[exportProgressIndicator setDoubleValue:[exporter exportProgressValue]];
diff --git a/Source/SPDotExporterDelegate.m b/Source/SPDotExporterDelegate.m
index 2d1e4b46..2ed60126 100644
--- a/Source/SPDotExporterDelegate.m
+++ b/Source/SPDotExporterDelegate.m
@@ -29,9 +29,6 @@
@implementation SPExportController (SPDotExporterDelegate)
-/**
- *
- */
- (void)dotExportProcessWillBegin:(SPDotExporter *)exporter
{
[[exportProgressTitle onMainThread] setStringValue:NSLocalizedString(@"Exporting Dot File", @"text showing that the application is exporting a Dot file")];
@@ -43,9 +40,6 @@
[[exportProgressIndicator onMainThread] setIndeterminate:NO];
}
-/**
- *
- */
- (void)dotExportProcessComplete:(SPDotExporter *)exporter
{
[NSApp endSheet:exportProgressWindow returnCode:0];
@@ -54,23 +48,17 @@
[tableDocumentInstance setQueryMode:SPInterfaceQueryMode];
// Restore the connection encoding to it's pre-export value
- [tableDocumentInstance setConnectionEncoding:[NSString stringWithFormat:@"%@%@", sqlPreviousConnectionEncoding, (sqlPreviousConnectionEncodingViaLatin1) ? @"-" : @""] reloadingViews:NO];
+ [tableDocumentInstance setConnectionEncoding:[NSString stringWithFormat:@"%@%@", previousConnectionEncoding, (previousConnectionEncodingViaLatin1) ? @"-" : @""] reloadingViews:NO];
// Display Growl notification
[self displayExportFinishedGrowlNotification];
}
-/**
- *
- */
- (void)dotExportProcessProgressUpdated:(SPDotExporter *)exporter
{
[exportProgressIndicator setDoubleValue:[exporter exportProgressValue]];
}
-/**
- *
- */
- (void)dotExportProcessWillBeginFetchingData:(SPDotExporter *)exporter forTableWithIndex:(NSUInteger)tableIndex
{
// Update the current table export index
@@ -81,9 +69,6 @@
[exportProgressText displayIfNeeded];
}
-/**
- *
- */
- (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]]];
diff --git a/Source/SPExportController.h b/Source/SPExportController.h
index 72a12a85..fd5455fd 100644
--- a/Source/SPExportController.h
+++ b/Source/SPExportController.h
@@ -210,12 +210,12 @@
/**
* Previous connection encoding
*/
- NSString *sqlPreviousConnectionEncoding;
+ NSString *previousConnectionEncoding;
/**
* Previous connection encoding was via Latin1
*/
- BOOL sqlPreviousConnectionEncodingViaLatin1;
+ BOOL previousConnectionEncodingViaLatin1;
/**
* The server's lower_case_table_names setting
diff --git a/Source/SPExportController.m b/Source/SPExportController.m
index 315df604..5b8b034e 100644
--- a/Source/SPExportController.m
+++ b/Source/SPExportController.m
@@ -95,7 +95,7 @@ static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled";
exportTypeLabel = @"";
createCustomFilename = NO;
- sqlPreviousConnectionEncodingViaLatin1 = NO;
+ previousConnectionEncodingViaLatin1 = NO;
tables = [[NSMutableArray alloc] init];
exporters = [[NSMutableArray alloc] init];
@@ -723,7 +723,7 @@ static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled";
[operationQueue release], operationQueue = nil;
[exportFilename release], exportFilename = nil;
- if (sqlPreviousConnectionEncoding) [sqlPreviousConnectionEncoding release], sqlPreviousConnectionEncoding = nil;
+ if (previousConnectionEncoding) [previousConnectionEncoding release], previousConnectionEncoding = nil;
[super dealloc];
}
diff --git a/Source/SPExportFile.h b/Source/SPExportFile.h
index 38f60429..eab05f9b 100644
--- a/Source/SPExportFile.h
+++ b/Source/SPExportFile.h
@@ -81,4 +81,5 @@
- (void)writeData:(NSData *)data;
- (SPExportFileHandleStatus)createExportFileHandle:(BOOL)overwrite;
- (void)setCompressionFormat:(SPFileCompressionFormat)fileCompressionFormat;
+
@end
diff --git a/Source/SPExportInitializer.m b/Source/SPExportInitializer.m
index 4cad22ba..d9ce4ecb 100644
--- a/Source/SPExportInitializer.m
+++ b/Source/SPExportInitializer.m
@@ -85,7 +85,7 @@
NSArray *dataArray = nil;
// Get rid of the cached connection encoding
- if (sqlPreviousConnectionEncoding) [sqlPreviousConnectionEncoding release], sqlPreviousConnectionEncoding = nil;
+ if (previousConnectionEncoding) [previousConnectionEncoding release], previousConnectionEncoding = nil;
createCustomFilename = ([[exportCustomFilenameTokenField stringValue] length] > 0);
@@ -282,8 +282,8 @@
[sqlExporter setSqlInsertDivider:[exportSQLInsertDividerPopUpButton indexOfSelectedItem]];
// Cache the current connection encoding then change it to UTF-8 to allow SQL dumps to work
- sqlPreviousConnectionEncoding = [[NSString alloc] initWithString:[connection encoding]];
- sqlPreviousConnectionEncodingViaLatin1 = [connection encodingUsesLatin1Transport];
+ previousConnectionEncoding = [[NSString alloc] initWithString:[connection encoding]];
+ previousConnectionEncodingViaLatin1 = [connection encodingUsesLatin1Transport];
[tableDocumentInstance setConnectionEncoding:@"utf8" reloadingViews:NO];
@@ -381,9 +381,9 @@
[dotExporter setDotDatabaseName:[tableDocumentInstance database]];
[dotExporter setDotDatabaseVersion:[tableDocumentInstance mySQLVersion]];
- // Cache the current connection encoding then change it to UTF-8 to allow SQL dumps to work
- sqlPreviousConnectionEncoding = [[NSString alloc] initWithString:[connection encoding]];
- sqlPreviousConnectionEncodingViaLatin1 = [connection encodingUsesLatin1Transport];
+ // Cache the current connection encoding then change it to UTF-8 to allow dumps to work
+ previousConnectionEncoding = [[NSString alloc] initWithString:[connection encoding]];
+ previousConnectionEncodingViaLatin1 = [connection encodingUsesLatin1Transport];
[tableDocumentInstance setConnectionEncoding:@"utf8" reloadingViews:NO];
diff --git a/Source/SPExporter.h b/Source/SPExporter.h
index e58c8d65..a4af52d3 100644
--- a/Source/SPExporter.h
+++ b/Source/SPExporter.h
@@ -61,7 +61,6 @@
BOOL exportUsingLowMemoryBlockingStreaming;
BOOL exportOutputCompressFile;
-
SPFileCompressionFormat exportOutputCompressionFormat;
NSString *exportData;
diff --git a/Source/SPHTMLExporterDelegate.m b/Source/SPHTMLExporterDelegate.m
index e4f02180..daafcd6b 100644
--- a/Source/SPHTMLExporterDelegate.m
+++ b/Source/SPHTMLExporterDelegate.m
@@ -27,28 +27,16 @@
@implementation SPExportController (SPHTMLExporterDelegate)
-/**
- *
- */
- (void)htmlExportProcessWillBegin:(SPHTMLExporter *)exporter
-{
-
+{
}
-/**
- *
- */
- (void)htmlExportProcessComplete:(SPHTMLExporter *)exporter
-{
-
+{
}
-/**
- *
- */
- (void)htmlExportProcessWillBeginWritingData:(SPHTMLExporter *)exporter
-{
-
+{
}
@end
diff --git a/Source/SPPDFExporterDelegate.m b/Source/SPPDFExporterDelegate.m
index e838adee..d2c78544 100644
--- a/Source/SPPDFExporterDelegate.m
+++ b/Source/SPPDFExporterDelegate.m
@@ -27,28 +27,16 @@
@implementation SPExportController (SPPDFExporterDelegate)
-/**
- *
- */
- (void)pdfExportProcessWillBegin:(SPPDFExporter *)exporter
{
-
}
-/**
- *
- */
- (void)pdfExportProcessComplete:(SPPDFExporter *)exporter
-{
-
+{
}
-/**
- *
- */
- (void)pdfExportProcessWillBeginWritingData:(SPPDFExporter *)exporter
-{
-
+{
}
@end
diff --git a/Source/SPSQLExporterDelegate.m b/Source/SPSQLExporterDelegate.m
index 89bc9b89..669d2563 100644
--- a/Source/SPSQLExporterDelegate.m
+++ b/Source/SPSQLExporterDelegate.m
@@ -29,9 +29,6 @@
@implementation SPExportController (SPSQLExporterDelegate)
-/**
- *
- */
- (void)sqlExportProcessWillBegin:(SPSQLExporter *)exporter
{
[[exportProgressTitle onMainThread] setStringValue:NSLocalizedString(@"Exporting SQL", @"text showing that the application is exporting SQL")];
@@ -41,9 +38,6 @@
[[exportProgressText onMainThread] displayIfNeeded];
}
-/**
- *
- */
- (void)sqlExportProcessComplete:(SPSQLExporter *)exporter
{
[exportProgressIndicator stopAnimation:self];
@@ -53,7 +47,7 @@
[tableDocumentInstance setQueryMode:SPInterfaceQueryMode];
// Restore the connection encoding to it's pre-export value
- [tableDocumentInstance setConnectionEncoding:[NSString stringWithFormat:@"%@%@", sqlPreviousConnectionEncoding, (sqlPreviousConnectionEncodingViaLatin1) ? @"-" : @""] reloadingViews:NO];
+ [tableDocumentInstance setConnectionEncoding:[NSString stringWithFormat:@"%@%@", previousConnectionEncoding, (previousConnectionEncodingViaLatin1) ? @"-" : @""] reloadingViews:NO];
// Display Growl notification
[self displayExportFinishedGrowlNotification];
@@ -64,21 +58,16 @@
}
}
-/**
- *
- */
- (void)sqlExportProcessProgressUpdated:(SPSQLExporter *)exporter
{
if ([exportProgressIndicator doubleValue] == 0) {
[exportProgressIndicator stopAnimation:self];
[exportProgressIndicator setIndeterminate:NO];
}
+
[exportProgressIndicator setDoubleValue:[exporter exportProgressValue]];
}
-/**
- *
- */
- (void)sqlExportProcessWillBeginFetchingData:(SPSQLExporter *)exporter
{
[exportProgressText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Fetching data...", @"export label showing that the app is fetching data for a specific table"), [exporter sqlCurrentTableExportIndex], exportTableCount, [exporter sqlExportCurrentTable]]];
@@ -89,9 +78,6 @@
[exportProgressIndicator setDoubleValue:0];
}
-/**
- *
- */
- (void)sqlExportProcessWillBeginWritingData:(SPSQLExporter *)exporter
{
[exportProgressText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Writing data...", @"export label showing app if writing data for a specific table"), [exporter sqlCurrentTableExportIndex], exportTableCount, [exporter sqlExportCurrentTable]]];
diff --git a/Source/SPXMLExporterDelegate.m b/Source/SPXMLExporterDelegate.m
index 8b1d9e73..33c039ff 100644
--- a/Source/SPXMLExporterDelegate.m
+++ b/Source/SPXMLExporterDelegate.m
@@ -27,13 +27,11 @@
#import "SPXMLExporter.h"
#import "SPDatabaseDocument.h"
#import "SPExportFile.h"
+
#import <SPMySQL/SPMySQL.h>
@implementation SPExportController (SPXMLExporterDelegate)
-/**
- *
- */
- (void)xmlExportProcessWillBegin:(SPXMLExporter *)exporter
{
[[exportProgressText onMainThread] displayIfNeeded];
@@ -57,9 +55,6 @@
[[exportProgressText onMainThread] displayIfNeeded];
}
-/**
- *
- */
- (void)xmlExportProcessComplete:(SPXMLExporter *)exporter
{
NSUInteger exportCount = [exporters count];
@@ -114,17 +109,11 @@
}
}
-/**
- *
- */
- (void)xmlExportProcessProgressUpdated:(SPXMLExporter *)exporter
{
[[exportProgressIndicator onMainThread] setDoubleValue:[exporter exportProgressValue]];
}
-/**
- *
- */
- (void)xmlExportProcessWillBeginWritingData:(SPXMLExporter *)exporter
{
// Only update the progress text if this is a table export