aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-07-25 11:01:42 +0000
committerstuconnolly <stuart02@gmail.com>2010-07-25 11:01:42 +0000
commit15578792fecccae6121b1e8b47108776e3d80747 (patch)
tree2920fb94612763f695cf5f1b187e290e62077ec5
parentf578b247bed73fe2b8a7f0fc2efbe0b191890df9 (diff)
downloadsequelpro-15578792fecccae6121b1e8b47108776e3d80747.tar.gz
sequelpro-15578792fecccae6121b1e8b47108776e3d80747.tar.bz2
sequelpro-15578792fecccae6121b1e8b47108776e3d80747.zip
Tidy up SPExportController by splitting out all filename related methods to a new category SPExportFilenameUtilities.
-rw-r--r--Source/SPCSVExporter.h2
-rw-r--r--Source/SPDotExporter.h2
-rw-r--r--Source/SPExportController.h3
-rw-r--r--Source/SPExportController.m177
-rw-r--r--Source/SPExportFilenameUtilities.h43
-rw-r--r--Source/SPExportFilenameUtilities.m188
-rw-r--r--Source/SPExportInitializer.h2
-rw-r--r--Source/SPExportInitializer.m12
-rw-r--r--Source/SPExporter.h2
-rw-r--r--Source/SPHTMLExporter.h2
-rw-r--r--Source/SPPDFExporter.h2
-rw-r--r--Source/SPSQLExporter.h2
-rw-r--r--Source/SPXMLExporter.h2
-rw-r--r--sequel-pro.xcodeproj/project.pbxproj6
14 files changed, 250 insertions, 195 deletions
diff --git a/Source/SPCSVExporter.h b/Source/SPCSVExporter.h
index b0c6c46b..f1148b7e 100644
--- a/Source/SPCSVExporter.h
+++ b/Source/SPCSVExporter.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
#import "SPExporter.h"
#import "SPCSVExporterProtocol.h"
diff --git a/Source/SPDotExporter.h b/Source/SPDotExporter.h
index 338acc37..40954782 100644
--- a/Source/SPDotExporter.h
+++ b/Source/SPDotExporter.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
#import "SPExporter.h"
#import "SPDotExporterProtocol.h"
diff --git a/Source/SPExportController.h b/Source/SPExportController.h
index 1868ec00..3e4d6aa7 100644
--- a/Source/SPExportController.h
+++ b/Source/SPExportController.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
#import "SPConstants.h"
@class MCPConnection, BWAnchoredButtonBar;
@@ -242,7 +240,6 @@
- (void)exportTables:(NSArray *)table asFormat:(SPExportType)format usingSource:(SPExportSource)source;
- (void)openExportErrorsSheetWithString:(NSString *)errors;
- (void)displayExportFinishedGrowlNotification;
-- (NSString *)expandCustomFilenameFormatFromString:(NSString *)format usingTableName:(NSString *)table;
// IB action methods
- (IBAction)closeSheet:(id)sender;
diff --git a/Source/SPExportController.m b/Source/SPExportController.m
index 0a36a32c..bb16d36f 100644
--- a/Source/SPExportController.m
+++ b/Source/SPExportController.m
@@ -37,11 +37,6 @@
@interface SPExportController (PrivateAPI)
-- (void)_updateDisplayedExportFilename;
-- (void)_updateAvailableExportFilenameTokens;
-- (NSString *)_generateDefaultExportFilename;
-- (NSString *)_currentDefaultExportFileExtension;
-
- (void)_toggleExportButton:(id)uiStateDict;
- (void)_toggleExportButtonOnBackgroundThread;
- (void)_toggleExportButtonWithBool:(NSNumber *)enable;
@@ -179,7 +174,7 @@
[exportTypeTabBar selectTabViewItemAtIndex:format];
// Set the default export filename
- [self _updateDisplayedExportFilename];
+ [self updateDisplayedExportFilename];
[self refreshTableList:self];
@@ -253,71 +248,6 @@
}
/**
- * Expands the custom filename format based on the selected tokens.
- */
-- (NSString *)expandCustomFilenameFormatFromString:(NSString *)format usingTableName:(NSString *)table
-{
- NSMutableString *string = [NSMutableString stringWithString:format];
-
- NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
-
- [dateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4];
-
- [dateFormatter setDateStyle:NSDateFormatterShortStyle];
- [dateFormatter setTimeStyle:NSDateFormatterNoStyle];
-
- [string replaceOccurrencesOfString:NSLocalizedString(@"host", @"export filename host token")
- withString:[tableDocumentInstance host]
- options:NSLiteralSearch
- range:NSMakeRange(0, [string length])];
-
- [string replaceOccurrencesOfString:NSLocalizedString(@"database", @"export filename database token")
- withString:[tableDocumentInstance database]
- options:NSLiteralSearch
- range:NSMakeRange(0, [string length])];
-
- [string replaceOccurrencesOfString:NSLocalizedString(@"table", @"table")
- withString:(table) ? table : @""
- options:NSLiteralSearch
- range:NSMakeRange(0, [string length])];
-
- [string replaceOccurrencesOfString:NSLocalizedString(@"date", @"export filename date token")
- withString:[dateFormatter stringFromDate:[NSDate date]]
- options:NSLiteralSearch
- range:NSMakeRange(0, [string length])];
-
- [dateFormatter setDateStyle:NSDateFormatterNoStyle];
- [dateFormatter setTimeStyle:NSDateFormatterShortStyle];
-
- [string replaceOccurrencesOfString:NSLocalizedString(@"time", @"export filename time token")
- withString:[dateFormatter stringFromDate:[NSDate date]]
- options:NSLiteralSearch
- range:NSMakeRange(0, [string length])];
-
- // Strip comma separators
- [string replaceOccurrencesOfString:@","
- withString:@""
- options:NSLiteralSearch
- range:NSMakeRange(0, [string length])];
-
- // Replace colons with hyphens
- [string replaceOccurrencesOfString:@":"
- withString:@"-"
- options:NSLiteralSearch
- range:NSMakeRange(0, [string length])];
-
- // Replace forward slashes with hyphens
- [string replaceOccurrencesOfString:@"/"
- withString:@"-"
- options:NSLiteralSearch
- range:NSMakeRange(0, [string length])];
-
- [dateFormatter release];
-
- return string;
-}
-
-/**
* Closes the export dialog.
*/
- (IBAction)closeSheet:(id)sender
@@ -392,9 +322,9 @@
[exportCSVNULLValuesAsTextField setStringValue:[prefs stringForKey:SPNullValue]];
[exportXMLNULLValuesAsTextField setStringValue:[prefs stringForKey:SPNullValue]];
- [self _updateAvailableExportFilenameTokens];
+ [self updateAvailableExportFilenameTokens];
- if (!showCustomFilenameView) [self _updateDisplayedExportFilename];
+ if (!showCustomFilenameView) [self updateDisplayedExportFilename];
}
/**
@@ -415,8 +345,8 @@
[exportDeselectAllTablesButton setEnabled:isSelectedTables];
[exportRefreshTablesButton setEnabled:isSelectedTables];
- [self _updateAvailableExportFilenameTokens];
- [self _updateDisplayedExportFilename];
+ [self updateAvailableExportFilenameTokens];
+ [self updateDisplayedExportFilename];
}
}
@@ -571,7 +501,7 @@
*/
- (IBAction)changeExportCompressionFormat:(id)sender
{
- [self _updateDisplayedExportFilename];
+ [self updateDisplayedExportFilename];
}
/**
@@ -589,7 +519,7 @@
// On close update the displayed filename
if (!showCustomFilenameView) {
- [self _updateDisplayedExportFilename];
+ [self updateDisplayedExportFilename];
}
else {
[exportCustomFilenameViewLabelButton setTitle:NSLocalizedString(@"Customize Filename", @"default customize file name label")];
@@ -758,99 +688,6 @@
#pragma mark Private API
/**
- * Updates the displayed export filename, either custom or default.
- */
-- (void)_updateDisplayedExportFilename
-{
- NSString *filename = @"";
-
- if ([[exportCustomFilenameTokenField stringValue] length] > 0) {
-
- // Get the current export file extension
- NSString *extension = [self _currentDefaultExportFileExtension];
-
- filename = [self expandCustomFilenameFormatFromString:[exportCustomFilenameTokenField stringValue] usingTableName:[[tablesListInstance tables] objectAtIndex:1]];
-
- if ([extension length] > 0) filename = [filename stringByAppendingPathExtension:extension];
- }
- else {
- filename = [self _generateDefaultExportFilename];
- }
-
- [exportCustomFilenameViewLabelButton setTitle:[NSString stringWithFormat:NSLocalizedString(@"Customize Filename (%@)", @"customize file name label"), filename]];
-}
-
-/**
- * Updates the available export filename tokens.
- */
-- (void)_updateAvailableExportFilenameTokens
-{
- [exportCustomFilenameTokensField setStringValue:((exportSource == SPQueryExport) || (exportType == SPDotExport)) ? NSLocalizedString(@"host,database,date,time", @"custom export filename tokens without table") : NSLocalizedString(@"host,database,table,date,time", @"default custom export filename tokens")];
-}
-
-/**
- * Generates the default export filename based on the selected export options.
- */
-- (NSString *)_generateDefaultExportFilename
-{
- NSString *filename = @"";
- NSString *extension = [self _currentDefaultExportFileExtension];
-
- // Determine what the file name should be
- switch (exportSource)
- {
- case SPFilteredExport:
- filename = [NSString stringWithFormat:@"%@_view", [tableDocumentInstance table]];
- break;
- case SPQueryExport:
- filename = @"query_result";
- break;
- case SPTableExport:
- filename = [tableDocumentInstance database];
- break;
- }
-
- return ([extension length] > 0) ? [filename stringByAppendingPathExtension:extension] : filename;
-}
-
-/**
- * Returns the current default export file extension based on the selected export type.
- */
-- (NSString *)_currentDefaultExportFileExtension
-{
- NSString *extension = @"";
-
- switch (exportType) {
- case SPSQLExport:
- extension = SPFileExtensionSQL;
- break;
- case SPCSVExport:
- extension = @"csv";
- break;
- case SPXMLExport:
- extension = @"xml";
- break;
- case SPDotExport:
- extension = @"dot";
- break;
- }
-
- if ([exportOutputCompressionFormatPopupButton indexOfSelectedItem] != SPNoCompression) {
-
- SPFileCompressionFormat compressionFormat = [exportOutputCompressionFormatPopupButton indexOfSelectedItem];
-
- if ([extension length] > 0) {
- extension = [extension stringByAppendingPathExtension:(compressionFormat == SPGzipCompression) ? @"gz" : @"bz2"];
- }
- else {
- extension = (compressionFormat == SPGzipCompression) ? @"gz" : @"bz2";
- }
- }
-
- return extension;
-}
-
-/**
* Enables or disables the export button based on the state of various interface controls.
*/
- (void)_toggleExportButton:(id)uiStateDict
diff --git a/Source/SPExportFilenameUtilities.h b/Source/SPExportFilenameUtilities.h
new file mode 100644
index 00000000..7bbcea25
--- /dev/null
+++ b/Source/SPExportFilenameUtilities.h
@@ -0,0 +1,43 @@
+//
+// $Id$
+//
+// SPExportFilenameUtilities.h
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on July 25, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPExportController.h"
+
+/**
+ * @category SPExportFilenameUtilities SPExportFilenameUtilities.h
+ *
+ * @author Stuart Connolly http://stuconnolly.com/
+ *
+ * Export filename utilities category.
+ */
+@interface SPExportController (SPExportFilenameUtilities)
+
+- (void)updateDisplayedExportFilename;
+- (void)updateAvailableExportFilenameTokens;
+- (NSString *)generateDefaultExportFilename;
+- (NSString *)currentDefaultExportFileExtension;
+- (NSString *)expandCustomFilenameFormatFromString:(NSString *)format usingTableName:(NSString *)table;
+
+@end
diff --git a/Source/SPExportFilenameUtilities.m b/Source/SPExportFilenameUtilities.m
new file mode 100644
index 00000000..53786d51
--- /dev/null
+++ b/Source/SPExportFilenameUtilities.m
@@ -0,0 +1,188 @@
+//
+// $Id$
+//
+// SPExportFilenameUtilities.m
+// sequel-pro
+//
+// Created by Stuart Connolly (stuconnolly.com) on July 25, 2010
+// Copyright (c) 2010 Stuart Connolly. All rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// More info at <http://code.google.com/p/sequel-pro/>
+
+#import "SPExportFilenameUtilities.h"
+
+@implementation SPExportController (SPExportFilenameUtilities)
+
+/**
+ * Updates the displayed export filename, either custom or default.
+ */
+- (void)updateDisplayedExportFilename
+{
+ NSString *filename = @"";
+
+ if ([[exportCustomFilenameTokenField stringValue] length] > 0) {
+
+ // Get the current export file extension
+ NSString *extension = [self currentDefaultExportFileExtension];
+
+ filename = [self expandCustomFilenameFormatFromString:[exportCustomFilenameTokenField stringValue] usingTableName:[[tablesListInstance tables] objectAtIndex:1]];
+
+ if ([extension length] > 0) filename = [filename stringByAppendingPathExtension:extension];
+ }
+ else {
+ filename = [self generateDefaultExportFilename];
+ }
+
+ [exportCustomFilenameViewLabelButton setTitle:[NSString stringWithFormat:NSLocalizedString(@"Customize Filename (%@)", @"customize file name label"), filename]];
+}
+
+/**
+ * Updates the available export filename tokens.
+ */
+- (void)updateAvailableExportFilenameTokens
+{
+ [exportCustomFilenameTokensField setStringValue:((exportSource == SPQueryExport) || (exportType == SPDotExport)) ? NSLocalizedString(@"host,database,date,time", @"custom export filename tokens without table") : NSLocalizedString(@"host,database,table,date,time", @"default custom export filename tokens")];
+}
+
+/**
+ * Generates the default export filename based on the selected export options.
+ */
+- (NSString *)generateDefaultExportFilename
+{
+ NSString *filename = @"";
+ NSString *extension = [self currentDefaultExportFileExtension];
+
+ // Determine what the file name should be
+ switch (exportSource)
+ {
+ case SPFilteredExport:
+ filename = [NSString stringWithFormat:@"%@_view", [tableDocumentInstance table]];
+ break;
+ case SPQueryExport:
+ filename = @"query_result";
+ break;
+ case SPTableExport:
+ filename = [tableDocumentInstance database];
+ break;
+ }
+
+ return ([extension length] > 0) ? [filename stringByAppendingPathExtension:extension] : filename;
+}
+
+/**
+ * Returns the current default export file extension based on the selected export type.
+ */
+- (NSString *)currentDefaultExportFileExtension
+{
+ NSString *extension = @"";
+
+ switch (exportType) {
+ case SPSQLExport:
+ extension = SPFileExtensionSQL;
+ break;
+ case SPCSVExport:
+ extension = @"csv";
+ break;
+ case SPXMLExport:
+ extension = @"xml";
+ break;
+ case SPDotExport:
+ extension = @"dot";
+ break;
+ }
+
+ if ([exportOutputCompressionFormatPopupButton indexOfSelectedItem] != SPNoCompression) {
+
+ SPFileCompressionFormat compressionFormat = [exportOutputCompressionFormatPopupButton indexOfSelectedItem];
+
+ if ([extension length] > 0) {
+ extension = [extension stringByAppendingPathExtension:(compressionFormat == SPGzipCompression) ? @"gz" : @"bz2"];
+ }
+ else {
+ extension = (compressionFormat == SPGzipCompression) ? @"gz" : @"bz2";
+ }
+ }
+
+ return extension;
+}
+
+/**
+ * Expands the custom filename format based on the selected tokens.
+ */
+- (NSString *)expandCustomFilenameFormatFromString:(NSString *)format usingTableName:(NSString *)table
+{
+ NSMutableString *string = [NSMutableString stringWithString:format];
+
+ NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
+
+ [dateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4];
+
+ [dateFormatter setDateStyle:NSDateFormatterShortStyle];
+ [dateFormatter setTimeStyle:NSDateFormatterNoStyle];
+
+ [string replaceOccurrencesOfString:NSLocalizedString(@"host", @"export filename host token")
+ withString:[tableDocumentInstance host]
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [string length])];
+
+ [string replaceOccurrencesOfString:NSLocalizedString(@"database", @"export filename database token")
+ withString:[tableDocumentInstance database]
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [string length])];
+
+ [string replaceOccurrencesOfString:NSLocalizedString(@"table", @"table")
+ withString:(table) ? table : @""
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [string length])];
+
+ [string replaceOccurrencesOfString:NSLocalizedString(@"date", @"export filename date token")
+ withString:[dateFormatter stringFromDate:[NSDate date]]
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [string length])];
+
+ [dateFormatter setDateStyle:NSDateFormatterNoStyle];
+ [dateFormatter setTimeStyle:NSDateFormatterShortStyle];
+
+ [string replaceOccurrencesOfString:NSLocalizedString(@"time", @"export filename time token")
+ withString:[dateFormatter stringFromDate:[NSDate date]]
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [string length])];
+
+ // Strip comma separators
+ [string replaceOccurrencesOfString:@","
+ withString:@""
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [string length])];
+
+ // Replace colons with hyphens
+ [string replaceOccurrencesOfString:@":"
+ withString:@"-"
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [string length])];
+
+ // Replace forward slashes with hyphens
+ [string replaceOccurrencesOfString:@"/"
+ withString:@"-"
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [string length])];
+
+ [dateFormatter release];
+
+ return string;
+}
+
+@end
diff --git a/Source/SPExportInitializer.h b/Source/SPExportInitializer.h
index 189a46d2..d42429ee 100644
--- a/Source/SPExportInitializer.h
+++ b/Source/SPExportInitializer.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
#import "SPExportController.h"
@class SPCSVExporter, SPSQLExporter, SPXMLExporter, SPFileHandle;
diff --git a/Source/SPExportInitializer.m b/Source/SPExportInitializer.m
index fab11da9..0ba5037f 100644
--- a/Source/SPExportInitializer.m
+++ b/Source/SPExportInitializer.m
@@ -187,7 +187,7 @@
}
}
- [exportFilename setString:[exportFilename stringByAppendingPathExtension:[self _currentDefaultExportFileExtension]]];
+ [exportFilename setString:[exportFilename stringByAppendingPathExtension:[self currentDefaultExportFileExtension]]];
singleFileHandle = [self getFileHandleForFilePath:[[exportPathField stringValue] stringByAppendingPathComponent:exportFilename]];
}
@@ -285,7 +285,7 @@
// Create custom filename if required
[exportFilename setString:(createCustomFilename) ? [self expandCustomFilenameFormatFromString:[exportCustomFilenameTokenField stringValue] usingTableName:nil] : [NSString stringWithFormat:@"%@_%@", [tableDocumentInstance database], [[NSDate date] descriptionWithCalendarFormat:@"%Y-%m-%d" timeZone:nil locale:nil]]];
- [exportFilename setString:[exportFilename stringByAppendingPathExtension:[self _currentDefaultExportFileExtension]]];
+ [exportFilename setString:[exportFilename stringByAppendingPathExtension:[self currentDefaultExportFileExtension]]];
SPFileHandle *fileHandle = [self getFileHandleForFilePath:[[exportPathField stringValue] stringByAppendingPathComponent:exportFilename]];
@@ -324,7 +324,7 @@
}
}
- [exportFilename setString:[exportFilename stringByAppendingPathExtension:[self _currentDefaultExportFileExtension]]];
+ [exportFilename setString:[exportFilename stringByAppendingPathExtension:[self currentDefaultExportFileExtension]]];
singleFileHandle = [self getFileHandleForFilePath:[[exportPathField stringValue] stringByAppendingPathComponent:exportFilename]];
}
@@ -393,7 +393,7 @@
[exportFilename setString:[tableDocumentInstance database]];
}
- [exportFilename setString:[exportFilename stringByAppendingPathExtension:[self _currentDefaultExportFileExtension]]];
+ [exportFilename setString:[exportFilename stringByAppendingPathExtension:[self currentDefaultExportFileExtension]]];
SPFileHandle *fileHandle = [self getFileHandleForFilePath:[[exportPathField stringValue] stringByAppendingPathComponent:exportFilename]];
@@ -466,7 +466,7 @@
[exportFilename setString:(dataArray) ? [tableDocumentInstance database] : table];
}
- [exportFilename setString:[exportFilename stringByAppendingPathExtension:[self _currentDefaultExportFileExtension]]];
+ [exportFilename setString:[exportFilename stringByAppendingPathExtension:[self currentDefaultExportFileExtension]]];
fileHandle = [self getFileHandleForFilePath:[[exportPathField stringValue] stringByAppendingPathComponent:exportFilename]];
@@ -502,7 +502,7 @@
// If required create separate files
if ((exportSource == SPTableExport) && exportToMultipleFiles && (exportTableCount > 0)) {
[exportFilename setString:[[exportPathField stringValue] stringByAppendingPathComponent:table]];
- [exportFilename setString:[exportFilename stringByAppendingPathExtension:[self _currentDefaultExportFileExtension]]];
+ [exportFilename setString:[exportFilename stringByAppendingPathExtension:[self currentDefaultExportFileExtension]]];
fileHandle = [self getFileHandleForFilePath:exportFilename];
diff --git a/Source/SPExporter.h b/Source/SPExporter.h
index d9dadb6c..22ca0cc3 100644
--- a/Source/SPExporter.h
+++ b/Source/SPExporter.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
/**
* @class SPExporter SPExporter.m
*
diff --git a/Source/SPHTMLExporter.h b/Source/SPHTMLExporter.h
index e58f8c80..fb0ce7f1 100644
--- a/Source/SPHTMLExporter.h
+++ b/Source/SPHTMLExporter.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
#import "SPExporter.h"
#import "SPHTMLExporterProtocol.h"
diff --git a/Source/SPPDFExporter.h b/Source/SPPDFExporter.h
index 62283c43..9071084f 100644
--- a/Source/SPPDFExporter.h
+++ b/Source/SPPDFExporter.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
#import "SPExporter.h"
#import "SPPDFExporterProtocol.h"
diff --git a/Source/SPSQLExporter.h b/Source/SPSQLExporter.h
index 6f42dd4c..43ba0172 100644
--- a/Source/SPSQLExporter.h
+++ b/Source/SPSQLExporter.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
#import "SPExporter.h"
#import "SPConstants.h"
#import "SPSQLExporterProtocol.h"
diff --git a/Source/SPXMLExporter.h b/Source/SPXMLExporter.h
index f80aacc6..b74c76bf 100644
--- a/Source/SPXMLExporter.h
+++ b/Source/SPXMLExporter.h
@@ -23,8 +23,6 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
-#import <Cocoa/Cocoa.h>
-
#import "SPExporter.h"
#import "SPXMLExporterProtocol.h"
diff --git a/sequel-pro.xcodeproj/project.pbxproj b/sequel-pro.xcodeproj/project.pbxproj
index ca412ecf..e77570ba 100644
--- a/sequel-pro.xcodeproj/project.pbxproj
+++ b/sequel-pro.xcodeproj/project.pbxproj
@@ -56,6 +56,7 @@
179F15060F7C433C00579954 /* SPEditorTokens.l in Sources */ = {isa = PBXBuildFile; fileRef = 179F15050F7C433C00579954 /* SPEditorTokens.l */; };
17A7773411C52D8E001E27B4 /* SPIndexesController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17A7773311C52D8E001E27B4 /* SPIndexesController.m */; };
17A7773811C52E61001E27B4 /* IndexesView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 17A7773611C52E61001E27B4 /* IndexesView.xib */; };
+ 17AF787B11FC41C00073D043 /* SPExportFilenameUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 17AF787A11FC41C00073D043 /* SPExportFilenameUtilities.m */; };
17B7B578101601C300F057DE /* libmysqlclient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 17B7B576101601C300F057DE /* libmysqlclient.a */; };
17B7B5901016028F00F057DE /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 17B7B58F1016028F00F057DE /* libcrypto.dylib */; };
17B7B592101602AE00F057DE /* libssl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 17B7B591101602AE00F057DE /* libssl.dylib */; };
@@ -499,6 +500,8 @@
17A7773211C52D8E001E27B4 /* SPIndexesController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPIndexesController.h; sourceTree = "<group>"; };
17A7773311C52D8E001E27B4 /* SPIndexesController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPIndexesController.m; sourceTree = "<group>"; };
17A7773711C52E61001E27B4 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Interfaces/English.lproj/IndexesView.xib; sourceTree = "<group>"; };
+ 17AF787911FC41C00073D043 /* SPExportFilenameUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPExportFilenameUtilities.h; sourceTree = "<group>"; };
+ 17AF787A11FC41C00073D043 /* SPExportFilenameUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPExportFilenameUtilities.m; sourceTree = "<group>"; };
17B7B5621016012700F057DE /* MCPKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MCPKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
17B7B576101601C300F057DE /* libmysqlclient.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libmysqlclient.a; sourceTree = "<group>"; };
17B7B577101601C300F057DE /* libmysqlclient_r.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libmysqlclient_r.a; sourceTree = "<group>"; };
@@ -1743,6 +1746,8 @@
173C836E11AAD26E00B8B084 /* SPExportInitializer.m */,
173C836F11AAD26E00B8B084 /* SPExportUtilities.h */,
173C837011AAD26E00B8B084 /* SPExportUtilities.m */,
+ 17AF787911FC41C00073D043 /* SPExportFilenameUtilities.h */,
+ 17AF787A11FC41C00073D043 /* SPExportFilenameUtilities.m */,
173C836C11AAD24300B8B084 /* Exporters */,
173C837C11AAD2C500B8B084 /* Delegate Protocols */,
173C837D11AAD2D300B8B084 /* Delegate Categories */,
@@ -2550,6 +2555,7 @@
58B909A511C3B919000826E5 /* DMLocalizedNibBundle.m in Sources */,
17A7773411C52D8E001E27B4 /* SPIndexesController.m in Sources */,
589ED05B11E0ACD100C1DCEA /* DMLocalizedNib.m in Sources */,
+ 17AF787B11FC41C00073D043 /* SPExportFilenameUtilities.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};