From d27b44c2119875f603c175e928073bea218f66ff Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Tue, 12 Mar 2013 01:31:21 +0000 Subject: - Improve startup when loading from file, preventing overwrite of details read from a spf/spfs during startup. This addresses Issue #1619 --- Source/SPConnectionController.h | 1 + Source/SPConnectionController.m | 11 ++++++++++- Source/SPDatabaseDocument.m | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/SPConnectionController.h b/Source/SPConnectionController.h index 9ee438b3..5866c495 100644 --- a/Source/SPConnectionController.h +++ b/Source/SPConnectionController.h @@ -232,6 +232,7 @@ // Favorites interaction - (void)updateFavoriteSelection:(id)sender; +- (void)updateFavoriteNextKeyView; - (NSMutableDictionary *)selectedFavorite; - (SPTreeNode *)selectedFavoriteNode; - (NSArray *)selectedFavoriteNodes; diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index dd2bd808..f68e2036 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -650,8 +650,17 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, } [prefs setInteger:[[fav objectForKey:SPFavoriteIDKey] integerValue] forKey:SPLastFavoriteID]; + + [self updateFavoriteNextKeyView]; +#endif +} - // Set the next KeyView to password field if the password is empty +/** + * Set the next KeyView to password field if the password is empty + */ +- (void)updateFavoriteNextKeyView +{ +#ifndef SP_CODA switch ([self type]) { case SPTCPIPConnection: diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index 58bc9fb1..ac7aa50e 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -4213,7 +4213,7 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase"; #ifndef SP_CODA // If not connected, update the favorite selection if (!_isConnected) { - [connectionController updateFavoriteSelection:self]; + [connectionController updateFavoriteNextKeyView]; } #endif } -- cgit v1.2.3