Revision: 8178 https://osdn.net/projects/ttssh2/scm/svn/commits/8178 Author: yutakapon Date: 2019-09-17 23:21:38 +0900 (Tue, 17 Sep 2019) Log Message: ----------- [Setup]-[Serial port] ダイアログのスピード設定にマウスオーバーすると、 ツールチップを表示するようにした。 branches/serial_port_improvedからリビジョン8150をマージ: [Setup]-[Serial port]> ダイアログのスピード設定でツールチップを表示するようにした。 ........ Modified Paths: -------------- trunk/doc/en/html/about/history.html trunk/doc/ja/html/about/history.html 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/teraterm/ttpdlg/ttdlg.c Property Changed: ---------------- trunk/ trunk/teraterm/ -------------- next part -------------- Index: trunk =================================================================== --- trunk 2019-09-17 13:38:14 UTC (rev 8177) +++ trunk 2019-09-17 14:21:38 UTC (rev 8178) Property changes on: trunk ___________________________________________________________________ Modified: svn:mergeinfo ## -2,7 +2,7 ## /branches/flowctrl_dsrdtr:7825-7827 /branches/openssl_1_1_1_v2:7888 /branches/portfwd_memleak:7732,7736-7737,7764 -/branches/serial_port_improved:8119,8140-8141,8144 +/branches/serial_port_improved:8119,8140-8141,8144,8150 /branches/ssh_ed25519:5495-5544 /branches/ttproxy_improved:8041,8055-8056 /branches/ttssh_improved:8027,8036,8040,8044,8053-8054,8058,8060,8063,8081,8085 Modified: trunk/doc/en/html/about/history.html =================================================================== --- trunk/doc/en/html/about/history.html 2019-09-17 13:38:14 UTC (rev 8177) +++ trunk/doc/en/html/about/history.html 2019-09-17 14:21:38 UTC (rev 8178) @@ -50,6 +50,7 @@ <li>The <a href="../menu/setup-serialport.html">[Setup]-[Serial port]</a> dialog can be called even while TCP/IP connection.</li> <li>The title of <a href="../menu/setup-serialport.html">[Setup]-[Serial port]</a> dialog is changed from "Serial port setup" to "Serial port setup and connection".</li> <li>The detail information of COM port is added on the <a href="../menu/setup-serialport.html#Information">[Setup]-[Serial port]</a> dialog.</li> + <li>The tooltip of the speed setting is added on the <a href="../menu/setup-serialport.html#Information">[Setup]-[Serial port]</a> dialog.</li> </ul> </li> <li>Bug fixes Modified: trunk/doc/ja/html/about/history.html =================================================================== --- trunk/doc/ja/html/about/history.html 2019-09-17 13:38:14 UTC (rev 8177) +++ trunk/doc/ja/html/about/history.html 2019-09-17 14:21:38 UTC (rev 8178) @@ -50,6 +50,7 @@ <li>TCP/IP\x90ڑ\xB1\x92\x86\x82ɂ\xA8\x82\xA2\x82Ă\xE0<a href="../menu/setup-serialport.html">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82\xF0\x8CĂяo\x82\xB9\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li> <li><a href="../menu/setup-serialport.html">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82̃^\x83C\x83g\x83\x8B\x82\xF0\x81u\x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ݒ\xE8\x81v\x82\xA9\x82\xE7\x81u\x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ݒ\xE8\x82Ɛڑ\xB1\x81v\x82ɕύX\x82\xB5\x82\xBD\x81B</li> <li><a href="../menu/setup-serialport.html#Information">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82\xC9COM\x83|\x81[\x83g\x82̏ڍ\xEE\x95\xF1\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li> + <li><a href="../menu/setup-serialport.html">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82̃X\x83s\x81[\x83h\x90ݒ\xE8\x82Ńc\x81[\x83\x8B\x83`\x83b\x83v\x82\xF0\x95\\x8E\xA6\x82\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li> </ul> </li> <li>\x83o\x83O\x8FC\x90\xB3 Modified: trunk/installer/release/lang/English.lng =================================================================== --- trunk/installer/release/lang/English.lng 2019-09-17 13:38:14 UTC (rev 8177) +++ trunk/installer/release/lang/English.lng 2019-09-17 14:21:38 UTC (rev 8178) @@ -369,6 +369,7 @@ DLG_SERIAL_DELAY=Transmit delay DLG_SERIAL_DELAYCHAR=msec/&char DLG_SERIAL_DELAYLINE=msec/&line +DLG_SERIAL_SPEED_TOOLTIP=You can directly specify a number DLG_TCPIP_TITLE=Tera Term: TCP/IP setup DLG_TCPIP_HOSTLIST=Host &list Modified: trunk/installer/release/lang/French.lng =================================================================== --- trunk/installer/release/lang/French.lng 2019-09-17 13:38:14 UTC (rev 8177) +++ trunk/installer/release/lang/French.lng 2019-09-17 14:21:38 UTC (rev 8178) @@ -370,6 +370,7 @@ DLG_SERIAL_DELAY=D\xE9lai de transmission DLG_SERIAL_DELAYCHAR=msec/&car DLG_SERIAL_DELAYLINE=msec/&ligne +DLG_SERIAL_SPEED_TOOLTIP=You can directly specify a number DLG_TCPIP_TITLE=Tera Term: Configuration TCP/IP DLG_TCPIP_HOSTLIST=Liste d'h\xF4tes Modified: trunk/installer/release/lang/German.lng =================================================================== --- trunk/installer/release/lang/German.lng 2019-09-17 13:38:14 UTC (rev 8177) +++ trunk/installer/release/lang/German.lng 2019-09-17 14:21:38 UTC (rev 8178) @@ -370,6 +370,7 @@ DLG_SERIAL_DELAY=Transmit delay DLG_SERIAL_DELAYCHAR=msec/char DLG_SERIAL_DELAYLINE=msec/line +DLG_SERIAL_SPEED_TOOLTIP=You can directly specify a number DLG_TCPIP_TITLE=Hostliste editieren DLG_TCPIP_HOSTLIST=Hostliste Modified: trunk/installer/release/lang/Japanese.lng =================================================================== --- trunk/installer/release/lang/Japanese.lng 2019-09-17 13:38:14 UTC (rev 8177) +++ trunk/installer/release/lang/Japanese.lng 2019-09-17 14:21:38 UTC (rev 8178) @@ -369,6 +369,7 @@ DLG_SERIAL_DELAY=\x91\x97\x90M\x92x\x89\x84 DLG_SERIAL_DELAYCHAR=\x83~\x83\x8A\x95b/\x8E\x9A(&C) DLG_SERIAL_DELAYLINE=\x83~\x83\x8A\x95b/\x8Ds(&L) +DLG_SERIAL_SPEED_TOOLTIP=\x90\x94\x92l\x82ړ\xFC\x97͂ł\xAB\x82܂\xB7 DLG_TCPIP_TITLE=Tera Term: TCP/IP \x90ݒ\xE8 DLG_TCPIP_HOSTLIST=\x83z\x83X\x83g\x83\x8A\x83X\x83g(&L) Modified: trunk/installer/release/lang/Korean.lng =================================================================== --- trunk/installer/release/lang/Korean.lng 2019-09-17 13:38:14 UTC (rev 8177) +++ trunk/installer/release/lang/Korean.lng 2019-09-17 14:21:38 UTC (rev 8178) @@ -370,6 +370,7 @@ DLG_SERIAL_DELAY=\xC0\xFC\xBC\xDB\xC1\xF6\xBF\xAC DLG_SERIAL_DELAYCHAR=msec/&char DLG_SERIAL_DELAYLINE=msec/&line +DLG_SERIAL_SPEED_TOOLTIP=You can directly specify a number DLG_TCPIP_TITLE=Tera Term: TCP/IP \xBC\xB3\xC1\xA4 DLG_TCPIP_HOSTLIST=ȣ\xBD\xBAƮ \xB8\xF1\xB7\xCF(&L) Modified: trunk/installer/release/lang/Russian.lng =================================================================== --- trunk/installer/release/lang/Russian.lng 2019-09-17 13:38:14 UTC (rev 8177) +++ trunk/installer/release/lang/Russian.lng 2019-09-17 14:21:38 UTC (rev 8178) @@ -370,6 +370,7 @@ DLG_SERIAL_DELAY=\xC7\xE0\xE4\xE5\xF0\xE6\xEA\xE0 \xEF\xE5\xF0\xE5\xE4\xE0\xF7\xE8 DLG_SERIAL_DELAYCHAR=\xEC\xF1/&\xF1\xE8\xEC\xE2\xEE\xEB DLG_SERIAL_DELAYLINE=\xEC\xF1/&\xF1\xF2\xF0\xEE\xEA\xE0 +DLG_SERIAL_SPEED_TOOLTIP=You can directly specify a number DLG_TCPIP_TITLE=Tera Term: \xCD\xE0\xF1\xF2\xF0\xEE\xE9\xEA\xE0 TCP/IP DLG_TCPIP_HOSTLIST=&\xCF\xE5\xF0\xE5\xF7\xE5\xED\xFC \xF5\xEE\xF1\xF2\xEE\xE2 Modified: trunk/installer/release/lang/Simplified Chinese.lng =================================================================== --- trunk/installer/release/lang/Simplified Chinese.lng 2019-09-17 13:38:14 UTC (rev 8177) +++ trunk/installer/release/lang/Simplified Chinese.lng 2019-09-17 14:21:38 UTC (rev 8178) @@ -370,6 +370,7 @@ DLG_SERIAL_DELAY=\xB4\xAB\xCA\xE4\xD1ӳ\xD9 DLG_SERIAL_DELAYCHAR=\xBA\xC1\xC3\xEB/\xD7ַ\xFB DLG_SERIAL_DELAYLINE=\xBA\xC1\xC3\xEB/\xD0\xD0 +DLG_SERIAL_SPEED_TOOLTIP=You can directly specify a number DLG_TCPIP_TITLE=Tera Term\xA3\xBATCP/IP \xC9\xE8\xD6\xC3 DLG_TCPIP_HOSTLIST=\xD6\xF7\xBB\xFA\xC1б\xED(&L) Modified: trunk/installer/release/lang/Traditional Chinese.lng =================================================================== --- trunk/installer/release/lang/Traditional Chinese.lng 2019-09-17 13:38:14 UTC (rev 8177) +++ trunk/installer/release/lang/Traditional Chinese.lng 2019-09-17 14:21:38 UTC (rev 8178) @@ -370,6 +370,7 @@ DLG_SERIAL_DELAY=\xB6ǿ驵\xBF\xF0 DLG_SERIAL_DELAYCHAR=\xB2@\xAC\xED/\xA6r\xB2\xC5 DLG_SERIAL_DELAYLINE=\xB2@\xAC\xED/\xA6\xE6 +DLG_SERIAL_SPEED_TOOLTIP=You can directly specify a number DLG_TCPIP_TITLE=Tera Term\xA1GTCP/IP \xB3]\xA9w DLG_TCPIP_HOSTLIST=\xA5D\xBE\xF7\xA6C\xAA\xED(&L) Index: trunk/teraterm =================================================================== --- trunk/teraterm 2019-09-17 13:38:14 UTC (rev 8177) +++ trunk/teraterm 2019-09-17 14:21:38 UTC (rev 8178) Property changes on: trunk/teraterm ___________________________________________________________________ Modified: svn:mergeinfo ## -1,4 +1,4 ## /branches/drag_and_drop/teraterm:7130,7139,7141,7143-7147 /branches/flowctrl_dsrdtr/teraterm:7825-7827 -/branches/serial_port_improved/teraterm:8119,8140-8141,8144 +/branches/serial_port_improved/teraterm:8119,8140-8141,8144,8150 /branches/vs2015_warn/teraterm:6194-6285 \ No newline at end of property Modified: trunk/teraterm/ttpdlg/ttdlg.c =================================================================== --- trunk/teraterm/ttpdlg/ttdlg.c 2019-09-17 13:38:14 UTC (rev 8177) +++ trunk/teraterm/ttpdlg/ttdlg.c 2019-09-17 14:21:38 UTC (rev 8178) @@ -47,6 +47,7 @@ #include "dlg_res.h" #include "svnversion.h" #include "ttdlg.h" +#include "tipwin.h" // Oniguruma: Regular expression library #define ONIG_EXTERN extern @@ -1104,6 +1105,8 @@ static PCHAR FlowList[] = {"Xon/Xoff", "RTS/CTS", "DSR/DTR", "none", NULL}; static int g_deltaSumSerialDlg = 0; // \x83}\x83E\x83X\x83z\x83C\x81[\x83\x8B\x82\xCCDelta\x97ݐϗp static WNDPROC g_defSerialDlgEditWndProc; // Edit Control\x82̃T\x83u\x83N\x83\x89\x83X\x89\xBB\x97p +static WNDPROC g_defSerialDlgSpeedComboboxWndProc; // Combo-box Control\x82̃T\x83u\x83N\x83\x89\x83X\x89\xBB\x97p +static TipWin *g_SerialDlgSpeedTip; /* * \x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ݒ\xE8\x83_\x83C\x83A\x83\x8D\x83O\x82̃e\x83L\x83X\x83g\x83{\x83b\x83N\x83X\x82\xC9COM\x83|\x81[\x83g\x82̏ڍ\xEE\x95\xF1\x82\xF0\x95\\x8E\xA6\x82\xB7\x82\xE9\x81B @@ -1118,6 +1121,9 @@ SendDlgItemMessage(dlg, IDC_SERIALTEXT, WM_SETTEXT, 0, (LPARAM)(char *)buf); } +/* + * \x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ݒ\xE8\x83_\x83C\x83A\x83\x8D\x83O\x82̃e\x83L\x83X\x83g\x83{\x83b\x83N\x83X\x82̃v\x83\x8D\x83V\x81[\x83W\x83\x83 + */ static LRESULT CALLBACK SerialDlgEditWindowProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) { WORD keys; @@ -1158,6 +1164,55 @@ } /* + * \x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ݒ\xE8\x83_\x83C\x83A\x83\x8D\x83O\x82\xCCSPEED(BAUD)\x82̃v\x83\x8D\x83V\x81[\x83W\x83\x83 + */ +static LRESULT CALLBACK SerialDlgSpeedComboboxWindowProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) +{ + const int tooltip_timeout = 1000; // msec + POINT pt; + int w, h; + int cx, cy; + RECT wr; + TCHAR str[128], uimsg[MAX_UIMSG]; + PTTSet ts; + + switch (msg) { + case WM_MOUSEMOVE: + ts = (PTTSet)GetWindowLongPtr(GetParent(hWnd) ,DWLP_USER); + get_lang_msg("DLG_SERIAL_SPEED_TOOLTIP", uimsg, sizeof(uimsg), "You can directly specify a number", ts->UILanguageFile); + _stprintf_s(str, _countof(str), _T(uimsg)); + + // Combo-box\x82̍\xB6\x8F\xE3\x8D\xC0\x95W\x82\xF0\x8B\x81\x82߂\xE9 + GetWindowRect(hWnd, &wr); + pt.x = wr.left; + pt.y = wr.top; + + // \x95\xB6\x8E\x9A\x97\xF1\x82̏c\x89\xA1\x83T\x83C\x83Y\x82\xF0\x8E擾\x82\xB7\x82\xE9 + TipWinGetTextWidthHeight(hWnd, str, &w, &h); + + cx = pt.x; + cy = pt.y - (h + FRAME_WIDTH * 6); + + // \x83c\x81[\x83\x8B\x83`\x83b\x83v\x82\xF0\x95\\x8E\xA6\x82\xB7\x82\xE9 + if (g_SerialDlgSpeedTip == NULL) { + g_SerialDlgSpeedTip = TipWinCreate(hWnd, cx, cy, str); + TipWinSetHideTimer(g_SerialDlgSpeedTip, tooltip_timeout); + + } else { + if (!TipWinIsVisible(g_SerialDlgSpeedTip)) + TipWinSetVisible(g_SerialDlgSpeedTip, TRUE); + + TipWinSetText(g_SerialDlgSpeedTip, str); + TipWinSetPos(g_SerialDlgSpeedTip, cx, cy); + TipWinSetHideTimer(g_SerialDlgSpeedTip, tooltip_timeout); + } + + break; + } + return CallWindowProc(g_defSerialDlgSpeedComboboxWndProc, hWnd, msg, wp, lp); +} + +/* * \x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ݒ\xE8\x83_\x83C\x83A\x83\x8D\x83O * * @@ -1285,6 +1340,12 @@ GWLP_WNDPROC, (LONG_PTR)SerialDlgEditWindowProc); + // Combo-box control\x82\xF0\x83T\x83u\x83N\x83\x89\x83X\x89\xBB\x82\xB7\x82\xE9\x81B + g_defSerialDlgSpeedComboboxWndProc = (WNDPROC)SetWindowLongPtr( + GetDlgItem(Dialog, IDC_SERIALBAUD), + GWLP_WNDPROC, + (LONG_PTR)SerialDlgSpeedComboboxWindowProc); + return TRUE; case WM_COMMAND: @@ -1340,10 +1401,22 @@ PostMessage(GetParent(Dialog),WM_USER_CHANGETITLE,0,0); } + // \x83c\x81[\x83\x8B\x83`\x83b\x83v\x82\xF0\x94p\x8A\xFC\x82\xB7\x82\xE9 + if (g_SerialDlgSpeedTip) { + TipWinDestroy(g_SerialDlgSpeedTip); + g_SerialDlgSpeedTip = NULL; + } + EndDialog(Dialog, 1); return TRUE; case IDCANCEL: + // \x83c\x81[\x83\x8B\x83`\x83b\x83v\x82\xF0\x94p\x8A\xFC\x82\xB7\x82\xE9 + if (g_SerialDlgSpeedTip) { + TipWinDestroy(g_SerialDlgSpeedTip); + g_SerialDlgSpeedTip = NULL; + } + EndDialog(Dialog, 0); return TRUE;