Revision: 8149 https://osdn.net/projects/ttssh2/scm/svn/commits/8149 Author: yutakapon Date: 2019-09-14 22:19:22 +0900 (Sat, 14 Sep 2019) Log Message: ----------- trunkからリビジョン8146-8148をマージ: MACRO typo fix ........ ANSI Color 設定のエディットコントロールの挙動を変更 - 値をチェック・反映するタイミングを EN_KILLFOCUS から EN_CHANGE に変更 - 入力値を BYTE で受け取って桁あふれしていたので int に変更し、上限値が 255 になるように変更 ........ TipWinの実装漏れを修正した - CTipWinのWNDCLASSをローカル変数にした - TipWinに実装が漏れていた関数を追加した - TipWinGetPos - TipWinSetVisible - TipWinIsExists ........ Modified Paths: -------------- branches/serial_port_improved/doc/en/html/about/history.html branches/serial_port_improved/teraterm/common/tipwin.cpp branches/serial_port_improved/teraterm/common/tipwin.h branches/serial_port_improved/teraterm/teraterm/addsetting.cpp Property Changed: ---------------- branches/serial_port_improved/ branches/serial_port_improved/teraterm/ -------------- next part -------------- Index: branches/serial_port_improved =================================================================== --- branches/serial_port_improved 2019-09-14 13:13:54 UTC (rev 8148) +++ branches/serial_port_improved 2019-09-14 13:19:22 UTC (rev 8149) Property changes on: branches/serial_port_improved ___________________________________________________________________ Modified: svn:mergeinfo ## -7,4 +7,4 ## /branches/ttssh_improved:8027,8036,8040,8044,8053-8054,8058,8060,8063,8081,8085 /branches/vs2015_warn:6194-6285 /tags/teraterm-4_89:6182 -/trunk:8120-8123,8137-8139,8142-8143 \ No newline at end of property +/trunk:8120-8123,8137-8139,8142-8143,8146-8148 \ No newline at end of property Modified: branches/serial_port_improved/doc/en/html/about/history.html =================================================================== --- branches/serial_port_improved/doc/en/html/about/history.html 2019-09-14 13:13:54 UTC (rev 8148) +++ branches/serial_port_improved/doc/en/html/about/history.html 2019-09-14 13:19:22 UTC (rev 8149) @@ -38,7 +38,7 @@ <li>Added support for hardware flow control DSR/DTR with serial connection. <ul> <li>The hardware is renamed to RTS/CTS, and DSR/DTR is newly added on the Flow control of <a href="../menu/setup-serialport.html">Serial port ([Setup] menu)</a>.</li> - <li>MARCO: The DSR/DTR can be specified in <a href="../macro/command/setflowctrl.html">setflowctrl</a> command.</li> + <li>MACRO: The DSR/DTR can be specified in <a href="../macro/command/setflowctrl.html">setflowctrl</a> command.</li> </ul></li> <li>Added SFMT information on version dialog.</li> <li>Changed of indication from "Protocol" to "IP version" and from "UNSPEC" to "AUTO" on <a href="../menu/file-new.html">New connection dialog</a>.</li> @@ -75,7 +75,7 @@ <li>The environment variable included in <a href="../menu/file-chdir.html">directory for file transfers</a> becomes to be expanded.</li> <li>Unspecified string font in IME uses your defined font.</li> <li>Added help button on Additional settings dialog.</li> - <li>MARCO: The <a href="../macro/command/fileopen.html">fileopen</a> command does not cause an error when a file can not be opened. Reverted changes in 4.102.</li> + <li>MACRO: The <a href="../macro/command/fileopen.html">fileopen</a> command does not cause an error when a file can not be opened. Reverted changes in 4.102.</li> <li>MACRO: When <a href="../macro/command/filetruncate.html">filetruncate</a> command does not cause an error when a file can not be opened, or file size can not be changed.</li> </ul> </li> @@ -151,7 +151,7 @@ <li>The language code(CodePage) of the "<a href="../menu/setup-terminal.html">Terminal ([Setup] menu)</a>" dialog(<a href="../usage/unicode.html">Unicode usage</a>).</li> <li>MACRO: The macro file can support UTF-8 and UTF-16(with BOM) encoding.</li> <li>MACRO: The <a href="../macro/command/getfileattr.html">getfileattr</a> command can be based on the current directory same as other command.</li> - <li>MARCO: The <a href="../macro/command/fileopen.html">fileopen</a> command can cause an error when a file is not found with read only mode.</li> + <li>MACRO: The <a href="../macro/command/fileopen.html">fileopen</a> command can cause an error when a file is not found with read only mode.</li> </ul> </li> @@ -711,7 +711,7 @@ <li>YMODEM: When the received file information contains only a file name, an end of the file name is broken.</li> <li>YMODEM: When the received file information does not include the file size, the file data can not be recorded well.</li> <li>The setting value of the <a href="../menu/setup-additional.html#LogRotate">Log Rotate</a> will not display well.</li> - <li>When the x=0,y=0 is specified by the <a href="../macro/command/setdlgpos.html">setdlgpos</a> marco command, the <a href="../macro/command/statusbox.html">statusbox</a> will be newly opened and however the statusbox can not be properly shown.</li> + <li>When the x=0,y=0 is specified by the <a href="../macro/command/setdlgpos.html">setdlgpos</a> macro command, the <a href="../macro/command/statusbox.html">statusbox</a> will be newly opened and however the statusbox can not be properly shown.</li> <li>When the macro filename is so longer, the currently executing line number can not be shown. And also, the macro window can be re-sizable.</li> </ul> </li> @@ -1019,7 +1019,7 @@ <li>added the 4th argument(current directory) at the <a href="../macro/command/exec.html">exec</a> command.</li> <li>The '<a href="../macro/command/show.html">show</a> 1' command brings the macro window to the top.</li> <li>The <a href="../macro/command/messagebox.html">messagebox</a>, <a href="../macro/command/inputbox.html">inputbox</a> and <a href="../macro/command/listbox.html">listbox</a> commands bring the macro dialog to the top.</li> - <li>The <a href="../macro/command/wait.html">wait</a>, <a href="../macro/command/waitln.html">waitln</a> and <a href="../marco/command/waitregex.html">waitregex</a> commands can wait an empty strings.</li> + <li>The <a href="../macro/command/wait.html">wait</a>, <a href="../macro/command/waitln.html">waitln</a> and <a href="../macro/command/waitregex.html">waitregex</a> commands can wait an empty strings.</li> <li>When the <a href="../macro/command/waitregex.html">waitregex</a> command matches some parameters at the same time, the first matched parameter is selected.</li> </ul></li> </ul> @@ -1037,8 +1037,8 @@ <li>The URL string on the mouse hand cursor shifts to the left with half character by mistake.</li> <li>MACRO: The send/sendln command can be affected by the <a href="../menu/setup-additional.html#PasteDelayPerLine">Paste delay per line</a> configuration.</li> <li>MACRO: When the timeout is 0, the <a href="../macro/command/waitn.html">waitn</a> command can not wait any character.</li> - <li>MARCO: When the break command is executed after the continue command, the Invalid Control error will be occurred.</li> - <li>MARCO: The box-style macro command can not show the dialog position well on the multi display.</li> + <li>MACRO: When the break command is executed after the continue command, the Invalid Control error will be occurred.</li> + <li>MACRO: The box-style macro command can not show the dialog position well on the multi display.</li> <li>MACRO: The <a href="../macro/command/wait.html">wait</a> and <a href="../macro/command/waitln.html">waitln</a> command can not detect the right string.(ex. wait "aab" does not work against "aaab")</li> </ul> </li> Index: branches/serial_port_improved/teraterm =================================================================== --- branches/serial_port_improved/teraterm 2019-09-14 13:13:54 UTC (rev 8148) +++ branches/serial_port_improved/teraterm 2019-09-14 13:19:22 UTC (rev 8149) Property changes on: branches/serial_port_improved/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/vs2015_warn/teraterm:6194-6285 -/trunk/teraterm:8120-8123,8137-8139,8142-8143 \ No newline at end of property +/trunk/teraterm:8120-8123,8137-8139,8142-8143,8146-8148 \ No newline at end of property Modified: branches/serial_port_improved/teraterm/common/tipwin.cpp =================================================================== --- branches/serial_port_improved/teraterm/common/tipwin.cpp 2019-09-14 13:13:54 UTC (rev 8148) +++ branches/serial_port_improved/teraterm/common/tipwin.cpp 2019-09-14 13:19:22 UTC (rev 8149) @@ -227,6 +227,7 @@ const UINT uDpi = GetMonitorDpiFromWindow(src); if (!tip_class) { + WNDCLASS wc; wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = WndProc; wc.cbClsExtra = 0; @@ -399,6 +400,14 @@ DeleteObject(tip_font); } +void TipWinGetPos(TipWin *tWin, int *x, int *y) +{ + CTipWin* tipwin = (CTipWin*) tWin; + POINT pt = tipwin->GetPos(); + *x = (int)pt.x; + *y = (int)pt.y; +} + void TipWinSetPos(TipWin *tWin, int x, int y) { CTipWin* tipwin = (CTipWin*) tWin; @@ -411,6 +420,12 @@ tipwin->SetText(str); } +void TipWinSetHideTimer(TipWin *tWin, int ms) +{ + CTipWin* tipwin = (CTipWin*) tWin; + tipwin->SetHideTimer(ms); +} + void TipWinDestroy(TipWin* tWin) { CTipWin* tipwin = (CTipWin*) tWin; @@ -417,6 +432,12 @@ tipwin->Destroy(); } +int TipWinIsExists(TipWin *tWin) +{ + CTipWin* tipwin = (CTipWin*) tWin; + return (int)tipwin->IsExists(); +} + void TipWinSetVisible(TipWin* tWin, int bVisible) { CTipWin* tipwin = (CTipWin*) tWin; Modified: branches/serial_port_improved/teraterm/common/tipwin.h =================================================================== --- branches/serial_port_improved/teraterm/common/tipwin.h 2019-09-14 13:13:54 UTC (rev 8148) +++ branches/serial_port_improved/teraterm/common/tipwin.h 2019-09-14 13:19:22 UTC (rev 8149) @@ -15,10 +15,11 @@ void TipWinSetText(TipWin *tWin, TCHAR *text); void TipWinDestroy(TipWin *tWin); void TipWinGetTextWidthHeight(HWND src, const TCHAR *str, int *width, int *height); +void TipWinGetPos(TipWin *tWin, int *x, int *y); void TipWinSetPos(TipWin *tWin, int x, int y); -void TipWinSetShow(TipWin *tWin); -void TipWinSetHide(TipWin *tWin); void TipWinSetHideTimer(TipWin *tWin, int ms); +void TipWinSetVisible(TipWin *tWin, int visible); +int TipWinIsExists(TipWin *tWin); int TipWinIsVisible(TipWin *tWin); #ifdef __cplusplus @@ -46,7 +47,6 @@ POINT pts; UINT timerid; TipWin* tWin; - WNDCLASS wc; static ATOM tip_class; static LRESULT CALLBACK WndProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam); VOID CalcStrRect(VOID); Modified: branches/serial_port_improved/teraterm/teraterm/addsetting.cpp =================================================================== --- branches/serial_port_improved/teraterm/teraterm/addsetting.cpp 2019-09-14 13:13:54 UTC (rev 8148) +++ branches/serial_port_improved/teraterm/teraterm/addsetting.cpp 2019-09-14 13:19:22 UTC (rev 8149) @@ -955,12 +955,11 @@ } return TRUE; - case IDC_COLOR_RED | (EN_KILLFOCUS << 16): - case IDC_COLOR_GREEN | (EN_KILLFOCUS << 16): - case IDC_COLOR_BLUE | (EN_KILLFOCUS << 16): + case IDC_COLOR_RED | (EN_CHANGE << 16) : + case IDC_COLOR_GREEN | (EN_CHANGE << 16) : + case IDC_COLOR_BLUE | (EN_CHANGE << 16) : { - BYTE r, g, b; - char buf[8]; + int r, g, b; sel = GetCurSel(IDC_ANSI_COLOR); if (sel < 0 && sel > sizeof(ts.ANSIColor)-1) { @@ -967,20 +966,36 @@ return TRUE; } - GetDlgItemTextA(IDC_COLOR_RED, buf, sizeof(buf)); - r = atoi(buf); + r = GetDlgItemInt(IDC_COLOR_RED); + if (r < 0) { + r = 0; + } + else if (r > 255) { + r = 255; + } + SetDlgItemNum(IDC_COLOR_RED, r); - GetDlgItemTextA(IDC_COLOR_GREEN, buf, sizeof(buf)); - g = atoi(buf); + g = GetDlgItemInt(IDC_COLOR_GREEN); + if (g < 0) { + g = 0; + } + else if (g > 255) { + g = 255; + } + SetDlgItemNum(IDC_COLOR_GREEN, g); - GetDlgItemTextA(IDC_COLOR_BLUE, buf, sizeof(buf)); - b = atoi(buf); + b = GetDlgItemInt(IDC_COLOR_BLUE); + if (b < 0) { + b = 0; + } + else if (b > 255) { + b = 255; + } + SetDlgItemNum(IDC_COLOR_BLUE, b); + // OK \x82\xF0\x89\x9F\x82\xB3\x82Ȃ\xAD\x82Ă\xE0\x90ݒ肪\x95ۑ\xB6\x82\xB3\x82\xEA\x82Ă\xA2\x82\xE9 ts.ANSIColor[sel] = RGB(r, g, b); - // 255\x82\xA6\x82\xBDRGB\x92l\x82͕\x82\xB3\x82\xEA\x82\xE9\x82̂ŁA\x82\xBB\x82\xEA\x82\xF0Edit\x82ɕ\\x8E\xA6\x82\xB7\x82\xE9 (2007.2.18 maya) - SetupRGBbox(sel); - ::InvalidateRect(GetDlgItem(IDC_SAMPLE_COLOR), NULL, TRUE); } return TRUE;