aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPExportInitializer.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-06-09 23:13:28 +0000
committerstuconnolly <stuart02@gmail.com>2010-06-09 23:13:28 +0000
commit8af7ab7046ab834bc392a0eb31128c7d0647fd53 (patch)
treecf8b893f42488b19b040683ee380a47b496db149 /Source/SPExportInitializer.m
parentb0d60faa09d16490dffe9c0b2a948d5d1890858a (diff)
downloadsequelpro-8af7ab7046ab834bc392a0eb31128c7d0647fd53.tar.gz
sequelpro-8af7ab7046ab834bc392a0eb31128c7d0647fd53.tar.bz2
sequelpro-8af7ab7046ab834bc392a0eb31128c7d0647fd53.zip
Exporter enhancements, including:
- Move the custom filename options view to a drop down view on the main exporter dialog. - Change the export data source matrix to a popup button. - Fix the export button being enabled when no tables are selected to be exported. - Various interface validation fixes.
Diffstat (limited to 'Source/SPExportInitializer.m')
-rw-r--r--Source/SPExportInitializer.m15
1 files changed, 2 insertions, 13 deletions
diff --git a/Source/SPExportInitializer.m b/Source/SPExportInitializer.m
index 4b7dc38c..7a03c110 100644
--- a/Source/SPExportInitializer.m
+++ b/Source/SPExportInitializer.m
@@ -54,19 +54,7 @@
// Get rid of the cached connection encoding
if (sqlPreviousConnectionEncoding) [sqlPreviousConnectionEncoding release], sqlPreviousConnectionEncoding = nil;
- createCustomFilename = ([exportCustomFilenameButton state] && (![[exportCustomFilenameTokenField stringValue] isEqualToString:@""]));
-
- // First determine what type of export the user selected
- for (NSToolbarItem *item in [exportToolbar items])
- {
- if ([[item itemIdentifier] isEqualToString:[exportToolbar selectedItemIdentifier]]) {
- exportType = [item tag];
- break;
- }
- }
-
- // Determine what data to use (filtered result, custom query result or selected table(s)) for the export operation
- exportSource = (exportType == SPDotExport) ? SPTableExport : ([exportInputMatrix selectedRow] + 1);
+ createCustomFilename = ([[exportCustomFilenameTokenField stringValue] length] > 0);
NSMutableArray *exportTables = [NSMutableArray array];
@@ -421,6 +409,7 @@
else {
[exportFilename setString:[tableDocumentInstance database]];
}
+
[exportFilename setString:[exportFilename stringByAppendingPathExtension:@"dot"]];
SPFileHandle *fileHandle = [self getFileHandleForFilePath:[[exportPathField stringValue] stringByAppendingPathComponent:exportFilename]];