From 8317097106e89ca010bee9771bd0c1f6d53754b8 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Tue, 16 Mar 2010 20:37:30 +0000 Subject: =?UTF-8?q?=E2=80=A2=20Connection=20Controller=20View=20-=20set=20?= =?UTF-8?q?favorite=20table's=20next=20key=20view=20in=20ConnectionView=20?= =?UTF-8?q?to=20tab=20view=20(standard,socket,ssh)=20to=20allow=20to=20nav?= =?UTF-8?q?igate=20via=20=E2=87=A5=20-=20if=20password=20field=20of=20the?= =?UTF-8?q?=20current=20selected=20connection=20in=20the=20ConnectionView?= =?UTF-8?q?=20is=20empty=20set=20first=20responder=20to=20it=20since=20it'?= =?UTF-8?q?s=20very=20likely=20that=20user=20wants=20to=20fill=20it;=20oth?= =?UTF-8?q?erwise=20favorite=20table=20is=20first=20responder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Interfaces/English.lproj/ConnectionView.xib | 70 ++++++++++++++++++++++------- Source/SPConnectionController.m | 17 +++++++ 2 files changed, 72 insertions(+), 15 deletions(-) diff --git a/Interfaces/English.lproj/ConnectionView.xib b/Interfaces/English.lproj/ConnectionView.xib index e37fb9da..243ce90c 100644 --- a/Interfaces/English.lproj/ConnectionView.xib +++ b/Interfaces/English.lproj/ConnectionView.xib @@ -21,12 +21,12 @@ YES - + YES - com.apple.InterfaceBuilder.CocoaPlugin com.brandonwalkin.BWToolkit + com.apple.InterfaceBuilder.CocoaPlugin YES @@ -278,7 +278,7 @@ controlColor 3 - MC42NjY2NjY2NjY3AA + MC42NjY2NjY2ODY1AA @@ -551,7 +551,7 @@ 2 - + 256 YES @@ -735,7 +735,6 @@ {{10, 33}, {360, 371}} - Socket @@ -744,7 +743,7 @@ Item 2 - + 256 YES @@ -1095,20 +1094,21 @@ {{10, 33}, {360, 371}} + SSH - + 0 YES YES YES - + @@ -1235,7 +1235,7 @@ Error Detail NSPanel - {1.79769e+308, 1.79769e+308} + {3.40282e+38, 3.40282e+38} {100, 100} @@ -1275,9 +1275,9 @@ YES - + 1 - MC45MDE5NjA3OSAwLjkwMTk2MDc5IDAuOTAxOTYwNzkAA + MC45MDE5NjA3OTAyIDAuOTAxOTYwNzkwMiAwLjkwMTk2MDc5MDIAA LucidaGrande @@ -1398,7 +1398,7 @@ YES - + LucidaGrande-Bold 10 @@ -1561,7 +1561,7 @@ {{0, 0}, {1440, 878}} {100, 119} - {1.79769e+308, 1.79769e+308} + {3.40282e+38, 3.40282e+38} @@ -2531,6 +2531,46 @@ 5462 + + + nextKeyView + + + + 5463 + + + + nextKeyView + + + + 5464 + + + + nextKeyView + + + + 5465 + + + + nextKeyView + + + + 5466 + + + + nextKeyView + + + + 5467 + @@ -3723,7 +3763,7 @@ YES com.apple.InterfaceBuilder.CocoaPlugin - {{331, 173}, {882, 563}} + {{73, 173}, {882, 563}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -4083,7 +4123,7 @@ - 5462 + 5467 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; + } } /** -- cgit v1.2.3