aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-04-13 00:54:58 +0000
committerrowanbeentje <rowan@beent.je>2009-04-13 00:54:58 +0000
commit4b9fd266140ad877b714ea58481e234062f864af (patch)
treeaf86dff8b36059228f8f80b25534f4ce1a20feca /Source
parent8df357943f349909e7c835dba7ac081d84dc4d86 (diff)
downloadsequelpro-4b9fd266140ad877b714ea58481e234062f864af.tar.gz
sequelpro-4b9fd266140ad877b714ea58481e234062f864af.tar.bz2
sequelpro-4b9fd266140ad877b714ea58481e234062f864af.zip
- Tweak the favorite button tooltips to refer to 'favorite's instead of 'row's
- Add the keyboard shortcuts advertised on the button tooltips to the buttons - When duplicating a favorite, append " Copy" to the name to ensure the keychain password isn't automatically shared and therefore accidentally changed or deleted for both when one favorite is edited.
Diffstat (limited to 'Source')
-rw-r--r--Source/SPPreferenceController.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m
index 5daf7f37..79589119 100644
--- a/Source/SPPreferenceController.m
+++ b/Source/SPPreferenceController.m
@@ -249,6 +249,9 @@
if ([favoritesTableView numberOfSelectedRows] == 1) {
NSMutableDictionary *favorite = [NSMutableDictionary dictionaryWithDictionary:[[favoritesController arrangedObjects] objectAtIndex:[favoritesTableView selectedRow]]];
+ // Alter the name to ensure the keychain item isn't shared and therefore overwritten when changed
+ [favorite setObject:[NSString stringWithFormat:@"%@ Copy", [favorite objectForKey:@"name"]] forKey:@"name"];
+
[favoritesController addObject:favorite];
[favoritesTableView reloadData];