aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDump.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-06-24 11:41:01 +0000
committerBibiko <bibiko@eva.mpg.de>2010-06-24 11:41:01 +0000
commitcc24661e6566d5f35e092642fe1fd435b49ad385 (patch)
tree3d6c6746dbe9c69038a8534170ba8fff73e13f8e /Source/TableDump.m
parented0e2e03219746667d71b9cccc72c2958bdd4d12 (diff)
downloadsequelpro-cc24661e6566d5f35e092642fe1fd435b49ad385.tar.gz
sequelpro-cc24661e6566d5f35e092642fe1fd435b49ad385.tar.bz2
sequelpro-cc24661e6566d5f35e092642fe1fd435b49ad385.zip
• replaced @"sql" and @"spf" by their SPConstant definitions
• further Save Session progress - store "saved as session accessory view data" globally to support "Save Session" - delete global "saved as session accessory view data" if last SP window will be closed - added to info.plist which tab is currently selected
Diffstat (limited to 'Source/TableDump.m')
-rw-r--r--Source/TableDump.m10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/TableDump.m b/Source/TableDump.m
index 4ea1255e..45c5c711 100644
--- a/Source/TableDump.m
+++ b/Source/TableDump.m
@@ -170,9 +170,9 @@
[self reloadTables:self];
[sqlCompressionSwitch setState:[prefs boolForKey:SPSQLExportUseCompression]?NSOnState:NSOffState];
if ([prefs boolForKey:SPSQLExportUseCompression]) {
- [currentExportPanel setAllowedFileTypes:[NSArray arrayWithObjects:@"sql.gz", @"gz", nil]];
+ [currentExportPanel setAllowedFileTypes:[NSArray arrayWithObjects:[NSString stringWithFormat:@"%@.gz", SPFileExtensionSQL], @"gz", nil]];
} else {
- [currentExportPanel setAllowedFileTypes:[NSArray arrayWithObjects:@"sql", nil]];
+ [currentExportPanel setAllowedFileTypes:[NSArray arrayWithObjects:SPFileExtensionSQL, nil]];
}
file = [NSString stringWithFormat:@"%@_%@.%@", [tableDocumentInstance database], currentDate, [currentExportPanel requiredFileType]];
[currentExportPanel setAccessoryView:exportDumpView];
@@ -3151,12 +3151,12 @@
{
if (exportMode == SPExportingSQL) {
if ([sender state] == NSOnState) {
- [currentExportPanel setAllowedFileTypes:[NSArray arrayWithObjects:@"sql.gz", @"gz", nil]];
+ [currentExportPanel setAllowedFileTypes:[NSArray arrayWithObjects:[NSString stringWithFormat:@"%@.gz", SPFileExtensionSQL], @"gz", nil]];
// if file name text view is the first responder re-select the path name only without '.sql.gz'
if([[currentExportPanel firstResponder] isKindOfClass:[NSTextView class]]) {
NSTextView *filenameTextView = (NSTextView *)[currentExportPanel firstResponder];
- if([filenameTextView selectedRange].length > 4 && [[filenameTextView string] hasSuffix:@".sql.gz"]) {
+ if([filenameTextView selectedRange].length > 4 && [[filenameTextView string] hasSuffix:[NSString stringWithFormat:@".%@.gz", SPFileExtensionSQL]]) {
NSRange selRange = [filenameTextView selectedRange];
selRange.length -= 4;
[filenameTextView setSelectedRange:selRange];
@@ -3164,7 +3164,7 @@
}
} else {
- [currentExportPanel setAllowedFileTypes:[NSArray arrayWithObject:@"sql"]];
+ [currentExportPanel setAllowedFileTypes:[NSArray arrayWithObject:SPFileExtensionSQL]];
}
[prefs setBool:([sender state] == NSOnState) forKey:SPSQLExportUseCompression];
}