aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TablesList.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-10-17 00:35:09 +0000
committerstuconnolly <stuart02@gmail.com>2009-10-17 00:35:09 +0000
commit6a4e2994d17220eb43015162522deec1efdd429b (patch)
treef1d2abc0691948bcbd901929c82347137ee0de85 /Source/TablesList.m
parentc3eb7de88f2baf7774749f4311a84b75ef833eb7 (diff)
downloadsequelpro-6a4e2994d17220eb43015162522deec1efdd429b.tar.gz
sequelpro-6a4e2994d17220eb43015162522deec1efdd429b.tar.bz2
sequelpro-6a4e2994d17220eb43015162522deec1efdd429b.zip
Replace the use of hard coded preference keys with constants to prevent issues such as the one fixed in revision 1419. All future preference usage should be done so using these constants.
Diffstat (limited to 'Source/TablesList.m')
-rw-r--r--Source/TablesList.m7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/TablesList.m b/Source/TablesList.m
index 11a931ec..348fb033 100644
--- a/Source/TablesList.m
+++ b/Source/TablesList.m
@@ -35,6 +35,7 @@
#import "RegexKitLite.h"
#import "SPDatabaseData.h"
#import "NSMutableArray-MultipleSort.h"
+#import "SPConstants.h"
@interface TablesList (PrivateAPI)
@@ -483,7 +484,7 @@
- (IBAction)togglePaneCollapse:(id)sender
{
[tableListSplitView toggleCollapse:sender];
- [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithBool:([tableInfoCollapseButton state] == NSOffState)] forKey:@"TableInformationPanelCollapsed"];
+ [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithBool:([tableInfoCollapseButton state] == NSOffState)] forKey:SPTableInformationPanelCollapsed];
[tableInfoCollapseButton setToolTip:([tableInfoCollapseButton state] == NSOffState) ? NSLocalizedString(@"Show Table Information", @"Show Table Information") : NSLocalizedString(@"Hide Table Information", @"Hide Table Information")];
}
@@ -632,7 +633,7 @@
// If encoding is set to Autodetect, update the connection character set encoding
// based on the newly selected table's encoding - but only if it differs from the current encoding.
- if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"DefaultEncoding"] isEqualToString:@"Autodetect"]) {
+ if ([[[NSUserDefaults standardUserDefaults] objectForKey:SPDefaultEncoding] isEqualToString:@"Autodetect"]) {
if (tableEncoding != nil && ![tableEncoding isEqualToString:[tableDocumentInstance connectionEncoding]]) {
[tableDocumentInstance setConnectionEncoding:tableEncoding reloadingViews:NO];
[tableDataInstance resetAllData];
@@ -1575,7 +1576,7 @@
{
// Collapse the table information pane if preference to do so is set
- if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"TableInformationPanelCollapsed"] boolValue]
+ if ([[[NSUserDefaults standardUserDefaults] objectForKey:SPTableInformationPanelCollapsed] boolValue]
&& [tableListSplitView collapsibleSubview]) {
[tableInfoCollapseButton setNextState];
[tableInfoCollapseButton setToolTip:NSLocalizedString(@"Show Table Information",@"Show Table Information")];