aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPPreferenceController.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-10-29 00:05:51 +0000
committerstuconnolly <stuart02@gmail.com>2009-10-29 00:05:51 +0000
commite16c728dd900cfe39369e0afe8c85f58e4aecdf7 (patch)
tree82161f9fc6e7eefe78877b6da5f27d3dde5bad89 /Source/SPPreferenceController.m
parent30a49adb59f7770c9fc7739c145389447da8bc39 (diff)
downloadsequelpro-e16c728dd900cfe39369e0afe8c85f58e4aecdf7.tar.gz
sequelpro-e16c728dd900cfe39369e0afe8c85f58e4aecdf7.tar.bz2
sequelpro-e16c728dd900cfe39369e0afe8c85f58e4aecdf7.zip
Replace hard coded occurrences of preference key DefaultFavorite with a constant.
Diffstat (limited to 'Source/SPPreferenceController.m')
-rw-r--r--Source/SPPreferenceController.m14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m
index d9fd38eb..51211043 100644
--- a/Source/SPPreferenceController.m
+++ b/Source/SPPreferenceController.m
@@ -346,8 +346,8 @@
}
// Reset default favorite
- if ([favoritesTableView selectedRow] == [prefs integerForKey:@"DefaultFavorite"]) {
- [prefs setInteger:[prefs integerForKey:SPLastFavoriteIndex] forKey:@"DefaultFavorite"];
+ if ([favoritesTableView selectedRow] == [prefs integerForKey:SPDefaultFavorite]) {
+ [prefs setInteger:[prefs integerForKey:SPLastFavoriteIndex] forKey:SPDefaultFavorite];
}
[favoritesController removeObjectAtArrangedObjectIndex:[favoritesTableView selectedRow]];
@@ -423,7 +423,7 @@
[prefs setBool:NO forKey:SPSelectLastFavoriteUsed];
// Minus 2 from index to account for the "Last Used" and separator items
- [prefs setInteger:[defaultFavoritePopup indexOfSelectedItem]-2 forKey:@"DefaultFavorite"];
+ [prefs setInteger:[defaultFavoritePopup indexOfSelectedItem]-2 forKey:SPDefaultFavorite];
}
}
@@ -470,7 +470,7 @@
// Set the default favorite popup back to preference
if (sender == [defaultFavoritePopup lastItem]) {
if (![prefs boolForKey:SPSelectLastFavoriteUsed]) {
- [defaultFavoritePopup selectItemAtIndex:[prefs integerForKey:@"DefaultFavorite"]+2];
+ [defaultFavoritePopup selectItemAtIndex:[prefs integerForKey:SPDefaultFavorite]+2];
} else {
[defaultFavoritePopup selectItemAtIndex:0];
}
@@ -603,8 +603,8 @@
}
// Update default favorite to take on new value
- if ([prefs integerForKey:@"DefaultFavorite"] == originalRow) {
- [prefs setInteger:destinationRow forKey:@"DefaultFavorite"];
+ if ([prefs integerForKey:SPDefaultFavorite] == originalRow) {
+ [prefs setInteger:destinationRow forKey:SPDefaultFavorite];
}
[self updateDefaultFavoritePopup];
@@ -1002,7 +1002,7 @@
// Select the default favorite from prefs
if (![prefs boolForKey:SPSelectLastFavoriteUsed]) {
- [defaultFavoritePopup selectItemAtIndex:[prefs integerForKey:@"DefaultFavorite"] + 2];
+ [defaultFavoritePopup selectItemAtIndex:[prefs integerForKey:SPDefaultFavorite] + 2];
} else {
[defaultFavoritePopup selectItemAtIndex:0];
}