diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPConnectionController.m | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index 956312c1..2e48106c 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -703,6 +703,23 @@ } [prefs setInteger:([favoritesTable selectedRow] - 1) forKey:SPLastFavoriteIndex]; + + + // Set first responder to password field if it is empty + switch([self type]) { + case SPTCPIPConnection: + if(![[standardPasswordField stringValue] length]) + [documentWindow makeFirstResponder:standardPasswordField]; + break; + case SPSocketConnection: + if(![[socketPasswordField stringValue] length]) + [documentWindow makeFirstResponder:socketPasswordField]; + break; + case SPSSHTunnelConnection: + if(![[sshPasswordField stringValue] length]) + [documentWindow makeFirstResponder:sshPasswordField]; + break; + } } /** |