svnno****@sourc*****
svnno****@sourc*****
2017年 4月 11日 (火) 02:52:55 JST
Revision: 6679 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6679 Author: doda Date: 2017-04-11 02:52:55 +0900 (Tue, 11 Apr 2017) Log Message: ----------- ダイアログ内のコントロールの位置調整 & i18n Modified Paths: -------------- trunk/installer/release/lang/English.lng trunk/installer/release/lang/French.lng trunk/installer/release/lang/German.lng trunk/installer/release/lang/Japanese.lng trunk/installer/release/lang/Korean.lng trunk/installer/release/lang/Russian.lng trunk/installer/release/lang/Simplified Chinese.lng trunk/installer/release/lang/Traditional Chinese.lng trunk/ttssh2/ttxssh/resource.h trunk/ttssh2/ttxssh/ssh.c trunk/ttssh2/ttxssh/ttxssh.rc -------------- next part -------------- Modified: trunk/installer/release/lang/English.lng =================================================================== --- trunk/installer/release/lang/English.lng 2017-04-10 17:52:52 UTC (rev 6678) +++ trunk/installer/release/lang/English.lng 2017-04-10 17:52:55 UTC (rev 6679) @@ -736,6 +736,13 @@ DLG_TIS_TITLE=SSH Authentication Challenge DLG_TIS_BANNER=Logging in to %s +; dlg passwd change +DLG_PASSCHG_TITLE=TTSSH: Change Password +DLG_PASSCHG_MESSAGE=Server requests to change password +DLG_PASSCHG_OLDPASSWD=&Old Password +DLG_PASSCHG_NEWPASSWD=&New Password +DLG_PASSCHG_CONFIRMPASSWD=&Confirm Password + ; dlg unknown host DLG_UNKNONWHOST_TITLE=SECURITY WARNING DLG_UNKNOWNHOST_WARNING=There is no entry for the server "#####################################" in your list of known hosts. The machine you have contacted may be a hostile machine pretending to be the server. Modified: trunk/installer/release/lang/French.lng =================================================================== --- trunk/installer/release/lang/French.lng 2017-04-10 17:52:52 UTC (rev 6678) +++ trunk/installer/release/lang/French.lng 2017-04-10 17:52:55 UTC (rev 6679) @@ -736,6 +736,13 @@ DLG_TIS_TITLE=SSH Challenge d'Authentification DLG_TIS_BANNER=Logging \xE0 %s +; dlg passwd change +DLG_PASSCHG_TITLE=TTSSH: Change Password +DLG_PASSCHG_MESSAGE=Server requests to change password +DLG_PASSCHG_OLDPASSWD=&Old Password +DLG_PASSCHG_NEWPASSWD=&New Password +DLG_PASSCHG_CONFIRMPASSWD=&Confirm Password + ; dlg unknown host DLG_UNKNONWHOST_TITLE=ALERTE DE SECURITE DLG_UNKNOWNHOST_WARNING=Il n'y a pas d'entr\xE9e pour le serveur "#####################################" dans votre liste d'h\xF4tes connus. La machine que vous avez contact\xE9e pourrait \xEAtre une machine hostile se faisant passer pour le serveur. Modified: trunk/installer/release/lang/German.lng =================================================================== --- trunk/installer/release/lang/German.lng 2017-04-10 17:52:52 UTC (rev 6678) +++ trunk/installer/release/lang/German.lng 2017-04-10 17:52:55 UTC (rev 6679) @@ -735,6 +735,13 @@ DLG_TIS_TITLE=SSH Authentication Challenge DLG_TIS_BANNER=Logging in to %s +; dlg passwd change +DLG_PASSCHG_TITLE=TTSSH: Change Password +DLG_PASSCHG_MESSAGE=Server requests to change password +DLG_PASSCHG_OLDPASSWD=&Old Password +DLG_PASSCHG_NEWPASSWD=&New Password +DLG_PASSCHG_CONFIRMPASSWD=&Confirm Password + ; dlg unknown host DLG_UNKNONWHOST_TITLE=SICHERHEITSWARNUNG DLG_UNKNOWNHOST_WARNING=Es gibt f\xFCr diesen Server ("#####################################") keinen Eintrag in der "known hosts"-Liste. Modified: trunk/installer/release/lang/Japanese.lng =================================================================== --- trunk/installer/release/lang/Japanese.lng 2017-04-10 17:52:52 UTC (rev 6678) +++ trunk/installer/release/lang/Japanese.lng 2017-04-10 17:52:55 UTC (rev 6679) @@ -736,6 +736,13 @@ DLG_TIS_TITLE=SSH \x94F\x8F`\x83\x83\x83\x8C\x83\x93\x83W DLG_TIS_BANNER=\x83\x8D\x83O\x83C\x83\x93\x92\x86: %s +; dlg passwd change +DLG_PASSCHG_TITLE=TTSSH: \x83p\x83X\x83\x8F\x81[\x83h\x95ύX +DLG_PASSCHG_MESSAGE=\x83T\x81[\x83o\x82̓p\x83X\x83\x8F\x81[\x83h\x82̕ύX\x82\xF0\x97v\x8B\x81\x82\xB5\x82Ă\xA2\x82܂\xB7. +DLG_PASSCHG_OLDPASSWD=\x8B\x8C\x83p\x83X\x83\x8F\x81[\x83h(&O) +DLG_PASSCHG_NEWPASSWD=\x90V\x83p\x83X\x83\x8F\x81[\x83h(&N) +DLG_PASSCHG_CONFIRMPASSWD=\x90V\x83p\x83X\x83\x8F\x81[\x83h\x8Am\x94F(&C) + ; dlg unknown host DLG_UNKNONWHOST_TITLE=\x83Z\x83L\x83\x85\x83\x8A\x83e\x83B\x8Cx\x8D\x90 DLG_UNKNOWNHOST_WARNING=known hosts\x83\x8A\x83X\x83g\x82ɃT\x81[\x83o"#####################################"\x82̃G\x83\x93\x83g\x83\x8A\x82͂\xA0\x82\xE8\x82܂\xB9\x82\xF1. \x88\xAB\x88ӂ\xF0\x8E\x9D\x82\xC1\x82\xBD\x83z\x83X\x83g\x82\xAA, \x90ڑ\xB1\x82\xB5\x82悤\x82Ƃ\xB5\x82Ă\xA2\x82\xE9\x83T\x81[\x83o\x82̂ӂ\xE8\x82\xF0\x82\xB5\x82Ă\xA2\x82\xE9\x89\\x90\xAB\x82\xE0\x82\xA0\x82\xE8\x82܂\xB7\x82̂\xC5, \x8F\\x95\xAA\x92\x8D\x88ӂ\xB5\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81I Modified: trunk/installer/release/lang/Korean.lng =================================================================== --- trunk/installer/release/lang/Korean.lng 2017-04-10 17:52:52 UTC (rev 6678) +++ trunk/installer/release/lang/Korean.lng 2017-04-10 17:52:55 UTC (rev 6679) @@ -736,6 +736,13 @@ DLG_TIS_TITLE=SSH \xC0\xCE\xC1\xF5 \xBDõ\xB5 DLG_TIS_BANNER=%s\xC0\xB8\xB7\xCE \xB7α\xD7\xC0\xCE \xC1\xDF +; dlg passwd change +DLG_PASSCHG_TITLE=TTSSH: Change Password +DLG_PASSCHG_MESSAGE=Server requests to change password +DLG_PASSCHG_OLDPASSWD=&Old Password +DLG_PASSCHG_NEWPASSWD=&New Password +DLG_PASSCHG_CONFIRMPASSWD=&Confirm Password + ; dlg unknown host DLG_UNKNONWHOST_TITLE=\xBA\xB8\xBE\xC8 \xB0\xE6\xB0\xED DLG_UNKNOWNHOST_WARNING=\xB4\xE7\xBD\xC5\xC0\xC7 known-host \xB8\xF1\xB7Ͽ\xA1\xB4\xC2 \xBC\xAD\xB9\xF6 "#####################################" \xC7\xF1\xC0\xCC \xBE\xF8\xBD\xC0\xB4ϴ\xD9. \xB4\xE7\xBD\xC5\xC0\xCC \xC1\xA2\xBC\xD3\xC7\xD1 \xC4\xC4ǻ\xC5ʹ\xC2 \xB1\xD7 \xBC\xAD\xB9\xF6\xB8\xA6 \xC8䳻\xB3\xBB\xB4\xC2 \xBE\xC7\xC0\xC7\xC0\xFB\xC0\xCE \xC4\xC4ǻ\xC5\xCD\xC0\xCF \xBC\xF6 \xC0ֽ\xC0\xB4ϴ\xD9. Modified: trunk/installer/release/lang/Russian.lng =================================================================== --- trunk/installer/release/lang/Russian.lng 2017-04-10 17:52:52 UTC (rev 6678) +++ trunk/installer/release/lang/Russian.lng 2017-04-10 17:52:55 UTC (rev 6679) @@ -737,6 +737,13 @@ DLG_TIS_TITLE=SSH \xE2\xFB\xE7\xEE\xE2 \xE0\xF3\xF2\xE5\xED\xF2\xE8\xF4\xE8\xEA\xE0\xF6\xE8\xE8 DLG_TIS_BANNER=\xC2\xE5\xF1\xF2\xE8 \xEB\xEE\xE3 \xE2 %s +; dlg passwd change +DLG_PASSCHG_TITLE=TTSSH: Change Password +DLG_PASSCHG_MESSAGE=Server requests to change password +DLG_PASSCHG_OLDPASSWD=&Old Password +DLG_PASSCHG_NEWPASSWD=&New Password +DLG_PASSCHG_CONFIRMPASSWD=&Confirm Password + ; dlg unknown host DLG_UNKNONWHOST_TITLE=\xCF\xD0\xC5\xC4\xD3\xCF\xD0\xC5\xC6\xC4\xC5\xCD\xC8\xC5 \xCE \xC1\xC5\xC7\xCE\xCF\xC0\xD1\xCD\xCE\xD1\xD2\xC8 DLG_UNKNOWNHOST_WARNING=\xCD\xE5\xF2 \xE7\xE0\xEF\xE8\xF1\xE8 \xE4\xEB\xFF \xF1\xE5\xF0\xE2\xE5\xF0\xE0 "####################################" \xE2 \xF1\xEF\xE8\xF1\xEA\xE5 \xE8\xE7\xE2\xE5\xF1\xF2\xED\xFB\xF5 \xF5\xEE\xF1\xF2\xEE\xE2. \xC2\xF0\xE0\xE6\xE4\xE5\xE1\xED\xFB\xE9 \xEA\xEE\xEC\xEF\xFC\xFE\xF2\xE5\xF0 \xEC\xEE\xE6\xE5\xF2 \xEF\xF0\xE8\xF2\xE2\xEE\xF0\xFF\xF2\xFC\xF1\xFF \xF1\xE5\xF0\xE2\xE5\xF0\xEE\xEC! Modified: trunk/installer/release/lang/Simplified Chinese.lng =================================================================== --- trunk/installer/release/lang/Simplified Chinese.lng 2017-04-10 17:52:52 UTC (rev 6678) +++ trunk/installer/release/lang/Simplified Chinese.lng 2017-04-10 17:52:55 UTC (rev 6679) @@ -737,6 +737,13 @@ DLG_TIS_TITLE=SSH \xC8\xCF֤\xCC\xF4ս DLG_TIS_BANNER=\xB5\xC7¼\xB5\xBD\xA3\xBA%s +; dlg passwd change +DLG_PASSCHG_TITLE=TTSSH: Change Password +DLG_PASSCHG_MESSAGE=Server requests to change password +DLG_PASSCHG_OLDPASSWD=&Old Password +DLG_PASSCHG_NEWPASSWD=&New Password +DLG_PASSCHG_CONFIRMPASSWD=&Confirm Password + ; dlg unknown host DLG_UNKNONWHOST_TITLE=\xB0\xB2ȫ\xBE\xAF\xB8\xE6 DLG_UNKNOWNHOST_WARNING=\xB7\xFE\xCE\xF1\xC6\xF7"#####################################"\xB2\xBB\xD4\xD9\xD2\xD1֪\xD6\xF7\xBB\xFA\xC1б\xED\xD6С\xA3\xCB\xFC\xBF\xC9\xC4\xDC\xCAǵжԷ\xFE\xCE\xF1\xC6\xF7αװ\xB5ģ\xAC\xC7\xEBС\xD0ģ\xA1 Modified: trunk/installer/release/lang/Traditional Chinese.lng =================================================================== --- trunk/installer/release/lang/Traditional Chinese.lng 2017-04-10 17:52:52 UTC (rev 6678) +++ trunk/installer/release/lang/Traditional Chinese.lng 2017-04-10 17:52:55 UTC (rev 6679) @@ -737,6 +737,13 @@ DLG_TIS_TITLE=SSH \xBB{\xC3ҬD\xBE\xD4 DLG_TIS_BANNER=\xB5n\xBF\xFD\xA8\xEC\xA1G%s +; dlg passwd change +DLG_PASSCHG_TITLE=TTSSH: Change Password +DLG_PASSCHG_MESSAGE=Server requests to change password +DLG_PASSCHG_OLDPASSWD=&Old Password +DLG_PASSCHG_NEWPASSWD=&New Password +DLG_PASSCHG_CONFIRMPASSWD=&Confirm Password + ; dlg unknown host DLG_UNKNONWHOST_TITLE=\xA6w\xA5\xFEĵ\xA7i DLG_UNKNOWNHOST_WARNING=\xA6\xF8\xAAA\xBE\xB9"#####################################"\xA4\xA3\xA6A\xA4w\xAA\xBE\xA5D\xBE\xF7\xA6C\xAA\x{D924}\xA1C\xA5\xA6\xA5i\xAF\xE0\xACO\xBCĹ\xEF\xA6\xF8\xAAA\xBE\xB9\xB0\xB0\xB8˪\xBA\xA1A\xBDФp\xA4ߡI Modified: trunk/ttssh2/ttxssh/resource.h =================================================================== --- trunk/ttssh2/ttxssh/resource.h 2017-04-10 17:52:52 UTC (rev 6678) +++ trunk/ttssh2/ttxssh/resource.h 2017-04-10 17:52:55 UTC (rev 6679) @@ -202,7 +202,6 @@ #define IDC_SSHUSETIS2 1206 #define IDC_REMEMBERPASSWORD 1207 #define IDC_EDIT2 1208 -#define IDC_NEW_PASSWD 1208 #define IDC_SENDFILE_TO 1208 #define IDC_SFTP_CONSOLE 1208 #define IDC_REMOVEKEY_EDIT 1208 @@ -218,6 +217,12 @@ #define IDC_FP_HASH_ALG_MD5 1218 #define IDC_FP_HASH_ALG_SHA256 1219 #define IDC_FORWARDAGENTNOTIFY 1220 +#define IDC_OLD_PASSWD 1221 +#define IDC_OLD_PASSWD_LABEL 1222 +#define IDC_NEW_PASSWD 1223 +#define IDC_NEW_PASSWD_LABEL 1224 +#define IDC_CONFIRM_PASSWD_LABEL 1225 +#define IDC_PASSWD_CHANGEREQ_MSG 1226 // Next default values for new objects // @@ -225,7 +230,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 114 #define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1221 +#define _APS_NEXT_CONTROL_VALUE 1227 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif Modified: trunk/ttssh2/ttxssh/ssh.c =================================================================== --- trunk/ttssh2/ttxssh/ssh.c 2017-04-10 17:52:52 UTC (rev 6678) +++ trunk/ttssh2/ttxssh/ssh.c 2017-04-10 17:52:55 UTC (rev 6679) @@ -7222,6 +7222,7 @@ #define PASSWD_MAXLEN 150 struct change_password { + PTInstVar pvar; char passwd[PASSWD_MAXLEN]; char new_passwd[PASSWD_MAXLEN]; }; @@ -7230,21 +7231,65 @@ { char retype_passwd[PASSWD_MAXLEN]; static struct change_password *cp; + LOGFONT logfont; + HFONT font; + static HFONT DlgChgPassFont; + char uimsg[MAX_UIMSG]; + static PTInstVar pvar; + switch (msg) { case WM_INITDIALOG: cp = (struct change_password *)lParam; + pvar = cp->pvar; + + font = (HFONT)SendMessage(dlg, WM_GETFONT, 0, 0); + GetObject(font, sizeof(LOGFONT), &logfont); + + if (UTIL_get_lang_font("DLG_TAHOMA_FONT", dlg, &logfont, &DlgChgPassFont, pvar)) { + SendDlgItemMessage(dlg, IDC_OLD_PASSWD_LABEL, WM_SETFONT, (WPARAM)DlgChgPassFont, MAKELPARAM(TRUE,0)); + } + else { + DlgChgPassFont = NULL; + } + + GetWindowText(dlg, uimsg, sizeof(uimsg)); + UTIL_get_lang_msg("DLG_PASSCHG_TITLE", pvar, uimsg); + SetWindowText(dlg, pvar->ts->UIMsg); + + GetDlgItemText(dlg, IDC_PASSWD_CHANGEREQ_MSG, uimsg, sizeof(uimsg)); + UTIL_get_lang_msg("DLG_PASSCHG_MESSAGE", pvar, uimsg); + SetDlgItemText(dlg, IDC_PASSWD_CHANGEREQ_MSG, pvar->ts->UIMsg); + + GetDlgItemText(dlg, IDC_OLD_PASSWD_LABEL, uimsg, sizeof(uimsg)); + UTIL_get_lang_msg("DLG_PASSCHG_OLDPASSWD", pvar, uimsg); + SetDlgItemText(dlg, IDC_OLD_PASSWD_LABEL, pvar->ts->UIMsg); + + GetDlgItemText(dlg, IDC_NEW_PASSWD_LABEL, uimsg, sizeof(uimsg)); + UTIL_get_lang_msg("DLG_PASSCHG_NEWPASSWD", pvar, uimsg); + SetDlgItemText(dlg, IDC_NEW_PASSWD_LABEL, pvar->ts->UIMsg); + + GetDlgItemText(dlg, IDC_CONFIRM_PASSWD_LABEL, uimsg, sizeof(uimsg)); + UTIL_get_lang_msg("DLG_PASSCHG_CONFIRMPASSWD", pvar, uimsg); + SetDlgItemText(dlg, IDC_CONFIRM_PASSWD_LABEL, pvar->ts->UIMsg); + return TRUE; case WM_COMMAND: switch (LOWORD(wParam)) { case IDOK: - SendMessage(GetDlgItem(dlg, IDC_PASSWD), WM_GETTEXT , sizeof(cp->passwd), (LPARAM)cp->passwd); + SendMessage(GetDlgItem(dlg, IDC_OLD_PASSWD), WM_GETTEXT , sizeof(cp->passwd), (LPARAM)cp->passwd); SendMessage(GetDlgItem(dlg, IDC_NEW_PASSWD), WM_GETTEXT , sizeof(cp->new_passwd), (LPARAM)cp->new_passwd); SendMessage(GetDlgItem(dlg, IDC_CONFIRM_PASSWD), WM_GETTEXT , sizeof(retype_passwd), (LPARAM)retype_passwd); if (strcmp(cp->new_passwd, retype_passwd) == 0) { EndDialog(dlg, 1); // dialog close + + if (DlgChgPassFont != NULL) { + DeleteObject(DlgChgPassFont); + DlgChgPassFont = NULL; + } + return TRUE; } MessageBox(NULL, "Mismatch; try again.", "ERROR", MB_OK | MB_ICONEXCLAMATION); @@ -7252,6 +7297,12 @@ case IDCANCEL: EndDialog(dlg, 0); // dialog close + + if (DlgChgPassFont != NULL) { + DeleteObject(DlgChgPassFont); + DlgChgPassFont = NULL; + } + return TRUE; } } @@ -7273,6 +7324,7 @@ notify_verbose_message(pvar, "SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ was received.", LOG_LEVEL_VERBOSE); + cp.pvar = pvar; DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_SSHPASSWD_INPUT), pvar->cv->HWin, passwd_change_dialog, (LPARAM)&cp); // 6byte\x81i\x83T\x83C\x83Y\x81{\x83p\x83f\x83B\x83\x93\x83O\x81{\x83^\x83C\x83v\x81j\x82\xF0\x8E\xE6\x82菜\x82\xA2\x82\xBD\x88ȍ~\x82̃y\x83C\x83\x8D\x81[\x83h Modified: trunk/ttssh2/ttxssh/ttxssh.rc =================================================================== --- trunk/ttssh2/ttxssh/ttxssh.rc 2017-04-10 17:52:52 UTC (rev 6678) +++ trunk/ttssh2/ttxssh/ttxssh.rc 2017-04-10 17:52:55 UTC (rev 6679) @@ -370,19 +370,20 @@ DEFPUSHBUTTON "Cancel",IDCANCEL,43,76,73,14 END -IDD_SSHPASSWD_INPUT DIALOGEX 0, 0, 231, 95 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "TTSSH: Password Authentication" +IDD_SSHPASSWD_INPUT DIALOGEX 0, 0, 240, 102 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "TTSSH: Change Password" FONT 8, "Tahoma", 0, 0, 0x0 BEGIN - DEFPUSHBUTTON "OK",IDOK,174,7,50,14 - PUSHBUTTON "Cancel",IDCANCEL,174,24,50,14 - LTEXT "Password",IDC_STATIC,34,9,32,8 - EDITTEXT IDC_PASSWD,67,9,98,14,ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "New Password",IDC_STATIC,17,33,48,8 - EDITTEXT IDC_NEW_PASSWD,67,31,97,14,ES_PASSWORD | ES_AUTOHSCROLL - LTEXT "Confirm Password",IDC_STATIC,7,58,59,8 - EDITTEXT IDC_CONFIRM_PASSWD,67,56,99,14,ES_PASSWORD | ES_AUTOHSCROLL + DEFPUSHBUTTON "OK",IDOK,184,7,50,14 + PUSHBUTTON "Cancel",IDCANCEL,184,24,50,14 + LTEXT "Server requests to change password",IDC_PASSWD_CHANGEREQ_MSG,15,10,160,8 + RTEXT "&Old Password",IDC_OLD_PASSWD_LABEL,7,32,70,8 + EDITTEXT IDC_OLD_PASSWD,80,29,96,14,ES_PASSWORD | ES_AUTOHSCROLL + RTEXT "&New Password",IDC_NEW_PASSWD_LABEL,7,56,70,8 + EDITTEXT IDC_NEW_PASSWD,80,53,96,14,ES_PASSWORD | ES_AUTOHSCROLL + RTEXT "&Confirm Password",IDC_CONFIRM_PASSWD_LABEL,7,80,70,8 + EDITTEXT IDC_CONFIRM_PASSWD,80,77,96,14,ES_PASSWORD | ES_AUTOHSCROLL END IDD_SSHDIFFERENTTYPEKEY DIALOGEX 0, 0, 260, 276 @@ -547,9 +548,9 @@ IDD_SSHPASSWD_INPUT, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 224 + RIGHTMARGIN, 234 TOPMARGIN, 7 - BOTTOMMARGIN, 88 + BOTTOMMARGIN, 100 END IDD_SSHDIFFERENTTYPEKEY, DIALOG