diff options
author | rowanbeentje <rowan@beent.je> | 2009-06-11 22:40:42 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-06-11 22:40:42 +0000 |
commit | fbdd43314fb401f3c563fab3a37e24799d31ef56 (patch) | |
tree | 35ab3aa829dbc436cc040da5434c8eb725a0c9d3 /Source/SPPreferenceController.m | |
parent | f75f70ecc3a72e771bee6e1a73944836d0883c53 (diff) | |
download | sequelpro-fbdd43314fb401f3c563fab3a37e24799d31ef56.tar.gz sequelpro-fbdd43314fb401f3c563fab3a37e24799d31ef56.tar.bz2 sequelpro-fbdd43314fb401f3c563fab3a37e24799d31ef56.zip |
- Fix saving of SSH tunnel passwords entered in preferences
- Select favourites added in preferences
- Scroll to newly added or duplicated favourites in both preferences and connection sheet
Diffstat (limited to 'Source/SPPreferenceController.m')
-rw-r--r-- | Source/SPPreferenceController.m | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m index 808e863c..10d58862 100644 --- a/Source/SPPreferenceController.m +++ b/Source/SPPreferenceController.m @@ -240,8 +240,10 @@ forKeys:[NSArray arrayWithObjects:@"name", @"host", @"socket", @"user", @"port", @"database", @"id", nil]]; [favoritesController addObject:favorite]; - + [favoritesController setSelectionIndex:[[favoritesController arrangedObjects] count]-1]; + [favoritesTableView reloadData]; + [favoritesTableView scrollRowToVisible:[favoritesTableView selectedRow]]; [self updateDefaultFavoritePopup]; } @@ -323,6 +325,7 @@ [favoritesController setSelectionIndex:[[favoritesController arrangedObjects] count]-1]; [favoritesTableView reloadData]; + [favoritesTableView scrollRowToVisible:[favoritesTableView selectedRow]]; [self updateDefaultFavoritePopup]; } } @@ -705,7 +708,7 @@ oldKeychainAccount = [keychain accountForSSHUser:[favoritesController valueForKeyPath:@"selection.sshUser"] sshHost:[favoritesController valueForKeyPath:@"selection.sshHost"]]; // Set up the new keychain name and account strings - newKeychainName = [keychain nameForFavoriteName:[nameField stringValue] id:[favoritesController valueForKeyPath:@"selection.id"]]; + newKeychainName = [keychain nameForSSHForFavoriteName:[nameField stringValue] id:[favoritesController valueForKeyPath:@"selection.id"]]; newKeychainAccount = [keychain accountForSSHUser:[sshUserField stringValue] sshHost:[sshHostField stringValue]]; // Delete the old keychain item |