diff options
author | rowanbeentje <rowan@beent.je> | 2013-02-21 00:50:15 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2013-02-21 00:50:15 +0000 |
commit | 77b2f3d777bc743b7b96a9f2267d1a89d704510d (patch) | |
tree | 36a5a2b9369b696a280e9ca6ad1e195e8f74de44 /Source/SPConnectionControllerDelegate.m | |
parent | 9aaa544772539410f28df132be78e0f44da1db10 (diff) | |
download | sequelpro-77b2f3d777bc743b7b96a9f2267d1a89d704510d.tar.gz sequelpro-77b2f3d777bc743b7b96a9f2267d1a89d704510d.tar.bz2 sequelpro-77b2f3d777bc743b7b96a9f2267d1a89d704510d.zip |
- When favorites in the connection view gave no password, no longer set the focus to the password field as soon as they're selected; instead, make the password field the next responder for tab keys. This addresses Issue #1555.
Diffstat (limited to 'Source/SPConnectionControllerDelegate.m')
-rw-r--r-- | Source/SPConnectionControllerDelegate.m | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/SPConnectionControllerDelegate.m b/Source/SPConnectionControllerDelegate.m index ec1c65f1..28dd8282 100644 --- a/Source/SPConnectionControllerDelegate.m +++ b/Source/SPConnectionControllerDelegate.m @@ -40,6 +40,7 @@ #import "SPFavoriteNode.h" #import "SPGroupNode.h" #import "SPTreeNode.h" +#import "SPFavoritesOutlineView.h" #endif #ifndef SP_CODA @@ -260,6 +261,13 @@ static NSString *SPQuickConnectImageWhite = @"quick-connect-icon-white.pdf"; - (BOOL)outlineView:(NSOutlineView *)outlineView shouldEditTableColumn:(NSTableColumn *)tableColumn item:(id)item { + NSEvent *event = [NSApp currentEvent]; + BOOL shiftTabbedIn = ([event type] == NSKeyDown && [[event characters] length] && [[event characters] characterAtIndex:0] == NSBackTabCharacter); + + if (shiftTabbedIn && [(SPFavoritesOutlineView *)outlineView justGainedFocus]) { + return NO; + } + return (item != quickConnectItem); } |