diff options
author | rowanbeentje <rowan@beent.je> | 2013-03-12 01:31:21 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2013-03-12 01:31:21 +0000 |
commit | d27b44c2119875f603c175e928073bea218f66ff (patch) | |
tree | c9c100915262b1e27e1b08bc3f5c17ea52a201bd /Source | |
parent | e78826bf5848073f6cd095f500bff7c98f11d8b2 (diff) | |
download | sequelpro-d27b44c2119875f603c175e928073bea218f66ff.tar.gz sequelpro-d27b44c2119875f603c175e928073bea218f66ff.tar.bz2 sequelpro-d27b44c2119875f603c175e928073bea218f66ff.zip |
- Improve startup when loading from file, preventing overwrite of details read from a spf/spfs during startup. This addresses Issue #1619
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPConnectionController.h | 1 | ||||
-rw-r--r-- | Source/SPConnectionController.m | 11 | ||||
-rw-r--r-- | Source/SPDatabaseDocument.m | 2 |
3 files changed, 12 insertions, 2 deletions
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 } |