diff options
author | stuconnolly <stuart02@gmail.com> | 2009-10-17 18:11:08 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2009-10-17 18:11:08 +0000 |
commit | 523844f584fc06b99c7cce5c5b0a17e9943b40d3 (patch) | |
tree | 05e1f1cfab55ded54ffb1a6dd643ecb90a2cb2a3 /Source | |
parent | b967aeff1d12af4e9b1f27bc65c8506e5a3a2d2d (diff) | |
download | sequelpro-523844f584fc06b99c7cce5c5b0a17e9943b40d3.tar.gz sequelpro-523844f584fc06b99c7cce5c5b0a17e9943b40d3.tar.bz2 sequelpro-523844f584fc06b99c7cce5c5b0a17e9943b40d3.zip |
Add constant for preference key 'AutoConnectToDefault' and replace occurrences of it's use.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPAppController.m | 4 | ||||
-rw-r--r-- | Source/SPConstants.h | 1 | ||||
-rw-r--r-- | Source/SPConstants.m | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m index 3b8cde01..23d410e3 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -397,7 +397,7 @@ // Manually open a new document, setting SPAppController as sender to trigger autoconnection if (firstTableDocument = [[NSDocumentController sharedDocumentController] makeUntitledDocumentOfType:@"SequelPro connection" error:nil]) { - if ([[NSUserDefaults standardUserDefaults] boolForKey:@"AutoConnectToDefault"]) { + if ([[NSUserDefaults standardUserDefaults] boolForKey:SPAutoConnectToDefault]) { [firstTableDocument setShouldAutomaticallyConnect:YES]; } [[NSDocumentController sharedDocumentController] addDocument:firstTableDocument]; @@ -553,7 +553,7 @@ /* Support for "make new document" */ - (void)insertInOrderedDocuments:(TableDocument *)doc { - if ([[NSUserDefaults standardUserDefaults] boolForKey:@"AutoConnectToDefault"]) + if ([[NSUserDefaults standardUserDefaults] boolForKey:SPAutoConnectToDefault]) [doc setShouldAutomaticallyConnect:YES]; [[NSDocumentController sharedDocumentController] addDocument:doc]; [doc makeWindowControllers]; diff --git a/Source/SPConstants.h b/Source/SPConstants.h index 8ab19b02..9e257894 100644 --- a/Source/SPConstants.h +++ b/Source/SPConstants.h @@ -61,6 +61,7 @@ extern NSString *SPConnectionTimeoutValue; extern NSString *SPUseKeepAlive; extern NSString *SPKeepAliveInterval; extern NSString *SPEditInSheetEnabled; +extern NSString *SPAutoConnectToDefault; extern NSString *SPQueryFavoriteReplacesContent; extern NSString *SPQueryHistoryReplacesContent; extern NSString *SPCustomQueryEditorFont; diff --git a/Source/SPConstants.m b/Source/SPConstants.m index 50e9496f..b2a88ee1 100644 --- a/Source/SPConstants.m +++ b/Source/SPConstants.m @@ -44,6 +44,7 @@ NSString *SPConnectionTimeoutValue = @"ConnectionTimeoutValue"; NSString *SPUseKeepAlive = @"UseKeepAlive"; NSString *SPKeepAliveInterval = @"KeepAliveInterval"; NSString *SPEditInSheetEnabled = @"EditInSheetEnabled"; +NSString *SPAutoConnectToDefault = @"AutoConnectToDefault"; NSString *SPQueryFavoriteReplacesContent = @"QueryFavoriteReplacesContent"; NSString *SPQueryHistoryReplacesContent = @"QueryHistoryReplacesContent"; NSString *SPCustomQueryEditorFont = @"CustomQueryEditorFont"; |