aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2011-04-29 21:51:35 +0000
committerstuconnolly <stuart02@gmail.com>2011-04-29 21:51:35 +0000
commitc290d41901c3a8d62532316990f8f1411d468f75 (patch)
treeef1b6d2284643afd5b24becc6fd9848441990448
parent7e0ffd0bc334be6e681f35710a8a70da34efbcea (diff)
downloadsequelpro-c290d41901c3a8d62532316990f8f1411d468f75.tar.gz
sequelpro-c290d41901c3a8d62532316990f8f1411d468f75.tar.bz2
sequelpro-c290d41901c3a8d62532316990f8f1411d468f75.zip
Add some constants.
-rw-r--r--Source/SPExportController.m16
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/SPExportController.m b/Source/SPExportController.m
index 2780df54..374ff158 100644
--- a/Source/SPExportController.m
+++ b/Source/SPExportController.m
@@ -43,6 +43,10 @@ static const NSString *SPTableViewStructureColumnID = @"structure";
static const NSString *SPTableViewContentColumnID = @"content";
static const NSString *SPTableViewDropColumnID = @"drop";
+static const NSString *SPSQLExportStructureEnabled = @"SQLExportStructureEnabled";
+static const NSString *SPSQLExportContentEnabled = @"SQLExportContentEnabled";
+static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled";
+
@interface SPExportController (PrivateAPI)
- (void)_switchTab;
@@ -805,9 +809,9 @@ static const NSString *SPTableViewDropColumnID = @"drop";
BOOL isHTML = (exportType == SPHTMLExport);
BOOL isPDF = (exportType == SPPDFExport);
- BOOL structureEnabled = [[uiStateDict objectForKey:@"SQLExportStructureEnabled"] integerValue];
- BOOL contentEnabled = [[uiStateDict objectForKey:@"SQLExportContentEnabled"] integerValue];
- BOOL dropEnabled = [[uiStateDict objectForKey:@"SQLExportDropEnabled"] integerValue];
+ BOOL structureEnabled = [[uiStateDict objectForKey:SPSQLExportStructureEnabled] integerValue];
+ BOOL contentEnabled = [[uiStateDict objectForKey:SPSQLExportContentEnabled] integerValue];
+ BOOL dropEnabled = [[uiStateDict objectForKey:SPSQLExportDropEnabled] integerValue];
if (isCSV || isXML || isHTML || isPDF || (isSQL && ((!structureEnabled) || (!dropEnabled)))) {
enable = NO;
@@ -864,9 +868,9 @@ static const NSString *SPTableViewDropColumnID = @"drop";
{
NSMutableDictionary *uiStateDict = [[NSMutableDictionary alloc] init];
- [uiStateDict setObject:[NSNumber numberWithInteger:[exportSQLIncludeStructureCheck state]] forKey:@"SQLExportStructureEnabled"];
- [uiStateDict setObject:[NSNumber numberWithInteger:[exportSQLIncludeContentCheck state]] forKey:@"SQLExportContentEnabled"];
- [uiStateDict setObject:[NSNumber numberWithInteger:[exportSQLIncludeDropSyntaxCheck state]] forKey:@"SQLExportDropEnabled"];
+ [uiStateDict setObject:[NSNumber numberWithInteger:[exportSQLIncludeStructureCheck state]] forKey:SPSQLExportStructureEnabled];
+ [uiStateDict setObject:[NSNumber numberWithInteger:[exportSQLIncludeContentCheck state]] forKey:SPSQLExportContentEnabled];
+ [uiStateDict setObject:[NSNumber numberWithInteger:[exportSQLIncludeDropSyntaxCheck state]] forKey:SPSQLExportDropEnabled];
[NSThread detachNewThreadSelector:@selector(_toggleExportButton:) toTarget:self withObject:uiStateDict];