svnno****@sourc*****
svnno****@sourc*****
2017年 3月 7日 (火) 17:57:41 JST
Revision: 6620 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6620 Author: doda Date: 2017-03-07 17:57:41 +0900 (Tue, 07 Mar 2017) Log Message: ----------- ドラッグ&ドロップ時のダイアログの挙動を調整 [Ttssh2-devel 3200] scp のリモートパス入力ボックスで Return を押した時に scp が実行される ように DEFPUSHBUTTON を SCP に変更。 その上で初期状態での Return で Cancel になるようにフォーカスを変更 するようにした。 Modified Paths: -------------- trunk/teraterm/teraterm/ttermpro.rc trunk/teraterm/teraterm/vtwin.cpp -------------- next part -------------- Modified: trunk/teraterm/teraterm/ttermpro.rc =================================================================== --- trunk/teraterm/teraterm/ttermpro.rc 2017-02-27 23:24:39 UTC (rev 6619) +++ trunk/teraterm/teraterm/ttermpro.rc 2017-03-07 08:57:41 UTC (rev 6620) @@ -35,8 +35,8 @@ LTEXT "SCP:",IDC_STATIC,15,27,16,8 EDITTEXT IDC_SCP_PATH,31,25,122,14,ES_AUTOHSCROLL PUSHBUTTON "Send file",IDOK,7,45,50,14 - PUSHBUTTON "SCP",IDC_DAD_SENDFILE,69,45,50,14 - DEFPUSHBUTTON "Cancel",IDCANCEL,129,45,50,14 + DEFPUSHBUTTON "SCP",IDC_DAD_SENDFILE,69,45,50,14 + PUSHBUTTON "Cancel",IDCANCEL,129,45,50,14 END IDD_COMMENT_DIALOG DIALOGEX 0, 0, 239, 19 Modified: trunk/teraterm/teraterm/vtwin.cpp =================================================================== --- trunk/teraterm/teraterm/vtwin.cpp 2017-02-27 23:24:39 UTC (rev 6619) +++ trunk/teraterm/teraterm/vtwin.cpp 2017-03-07 08:57:41 UTC (rev 6620) @@ -2019,17 +2019,25 @@ SendMessage(GetDlgItem(hDlgWnd, IDC_SCP_PATH), WM_SETTEXT, 0, (LPARAM)ts.ScpSendDir); - // \x83L\x83\x83\x83\x93\x83Z\x83\x8B\x83{\x83^\x83\x93\x82\xF0\x83f\x83t\x83H\x83\x8B\x83g\x82ɂ\xB5\x81A\x96\xB3\x88ӎ\xAF\x82\xC9Enter\x83L\x81[\x82\xF0\x89\x9F\x89\xBA\x82\xB5\x82Ă\xE0\x81A\x89\xBD\x82\xE0\x82\xB5\x82Ȃ\xA2\x82悤\x82ɂ\xB7\x82\xE9\x81B - SetFocus(GetDlgItem(hDlgWnd, IDCANCEL)); - PostMessage(GetDlgItem(hDlgWnd, IDCANCEL), WM_NEXTDLGCTL, 0, 0L) ; - // SSH2 \x90ڑ\xB1\x82ł͂Ȃ\xA2\x8Fꍇ\x82ɂ\xCD "SCP" \x82\x{27B0B7}\x82\xE9\x81B if (cv.isSSH != 2) { EnableWindow(GetDlgItem(hDlgWnd, IDC_DAD_SENDFILE), FALSE); EnableWindow(GetDlgItem(hDlgWnd, IDC_SCP_PATH), FALSE); EnableWindow(GetDlgItem(hDlgWnd, IDC_STATIC), FALSE); + + // \x83t\x83H\x81[\x83J\x83X\x82̏\x89\x8A\xFA\x8F\xF3\x91Ԃ\xF0 Cancel \x82ɂ\xB7\x82\xE9\x81B + // \x8C\xE3\x82\xC5 WM_NEXTDLGCTL \x82𑗂\xE9\x82̂ŁA Cancel \x82̈\xEA\x82O\x82\xCC Send file (IDOK) \x82\xC9 + // \x83t\x83H\x81[\x83J\x83X\x82Ă\xE9\x81B(SCP \x82͖\xB3\x8C\xF8\x82ɂȂ\xC1\x82Ă\xA2\x82\xE9\x88\xD7) + SetFocus(GetDlgItem(hDlgWnd, IDOK)); } + else { + // SSH2 \x90ڑ\xB1\x8E\x9E\x82\xCD SCP (IDC_DAD_SENDFILE) \x82\xAA\x88\xEA\x82O + SetFocus(GetDlgItem(hDlgWnd, IDC_DAD_SENDFILE)); + } + // \x83t\x83H\x81[\x83J\x83X\x82\xF0\x8E\x9F\x82̃{\x83^\x83\x93(Cancel)\x82Ɉڂ\xB7 + PostMessage(hDlgWnd, WM_NEXTDLGCTL, 0, 0L); + // TRUE\x82ɂ\xB7\x82\xE9\x82ƃ{\x83^\x83\x93\x82Ƀt\x83H\x81[\x83J\x83X\x82\xAA\x93\x96\x82\xBD\x82\xE7\x82Ȃ\xA2\x81B return FALSE;