• R/O
  • SSH
  • HTTPS

ttssh2: 提交


Commit MetaInfo

修訂8648 (tree)
時間2020-03-28 23:26:06
作者zmatsuo

Log Message

Fix yesnobox showing OK/No

- lng ファイルを読み込まなかったとき
- ボタンの文字が設定されずに "OK" のままとなっていた
- ticket #40286
- r8632

Change Summary

差異

--- branches/4-stable/doc/en/html/about/history.html (revision 8647)
+++ branches/4-stable/doc/en/html/about/history.html (revision 8648)
@@ -41,6 +41,7 @@
4141
4242 <li>Bug fixes
4343 <ul>
44+ <li>MACRO: the <a href="../macro/command/yesnobox.html">yesnobox</a> command shows "OK" instead of "yes" without language file. This bug was introduced in 4.103.</li>
4445 <li>Fixed memory leak when tooltip show. This bug was introduced in 4.103.</li>
4546 <li>Fixed support for IME feedback back and forth function. This bug was introduced in 4.103.</li>
4647 <li>Fixed desktop images can not be displayed on background other than main display. This bug was introduced in 4.103.</li>
--- branches/4-stable/doc/ja/html/about/history.html (revision 8647)
+++ branches/4-stable/doc/ja/html/about/history.html (revision 8648)
@@ -41,6 +41,7 @@
4141
4242 <li>バグ修正
4343 <ul>
44+ <li><a href="../macro/command/yesnobox.html">yesnobox</a> マクロコマンドで、言語ファイルを読み込まないとき "OK" が表示されていた。"yes" に修正。4.103でエンバグ。</li>
4445 <li>ツールチップ表示時のメモリリークを修正。4.103でのエンバグ。</li>
4546 <li><a href="../usage/tips/ime.html#feedback">IMEの前後参照変換機能</a>が動作するよう修正。4.103でのエンバグ。</li>
4647 <li>メインディスプレイ以外でデスクトップ画像を背景に表示できなかったのを修正。4.101でのエンバグ。</li>
--- branches/4-stable/teraterm/ttpmacro/msgdlg.cpp (revision 8647)
+++ branches/4-stable/teraterm/ttpmacro/msgdlg.cpp (revision 8648)
@@ -1,6 +1,6 @@
11 /*
22 * Copyright (C) 1994-1998 T. Teranishi
3- * (C) 2006-2019 TeraTerm Project
3+ * (C) 2006-2020 TeraTerm Project
44 * All rights reserved.
55 *
66 * Redistribution and use in source and binary forms, with or without
@@ -61,19 +61,22 @@
6161
6262 BOOL CMsgDlg::OnInitDialog()
6363 {
64- static const DlgTextInfo TextInfosOk[] = {
65- { IDOK, "BTN_OK" },
66- };
67- static const DlgTextInfo TextInfosYesNo[] = {
68- { IDOK, "BTN_YES" },
69- { IDCANCEL, "BTN_NO" },
70- };
7164 RECT R;
7265 HWND HOk;
7366
67+ // IDOK のデフォルト "OK", 表示
68+ // IDCANCEL のデフォルト "No", 非表示
7469 if (YesNoFlag) {
70+ static const DlgTextInfo TextInfosYesNo[] = {
71+ { IDOK, "BTN_YES" },
72+ { IDCANCEL, "BTN_NO" },
73+ };
74+ SetDlgItemTextA(IDOK, "Yes"); // lng ファイルなし対策
7575 SetDlgTexts(m_hWnd, TextInfosYesNo, _countof(TextInfosYesNo), UILanguageFile);
7676 } else {
77+ static const DlgTextInfo TextInfosOk[] = {
78+ { IDOK, "BTN_OK" },
79+ };
7780 SetDlgTexts(m_hWnd, TextInfosOk, _countof(TextInfosOk), UILanguageFile);
7881 }
7982
Show on old repository browser