[Ttssh2-commit] [8648] Fix yesnobox showing OK/No

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2020年 3月 28日 (土) 23:26:06 JST


Revision: 8648
          https://osdn.net/projects/ttssh2/scm/svn/commits/8648
Author:   zmatsuo
Date:     2020-03-28 23:26:06 +0900 (Sat, 28 Mar 2020)
Log Message:
-----------
Fix yesnobox showing OK/No

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

Revision Links:
--------------
    https://osdn.net/projects/ttssh2/scm/svn/commits/8632

Ticket Links:
------------
    https://osdn.net/projects/ttssh2/tracker/detail/40286

Modified Paths:
--------------
    branches/4-stable/doc/en/html/about/history.html
    branches/4-stable/doc/ja/html/about/history.html
    branches/4-stable/teraterm/ttpmacro/msgdlg.cpp

-------------- next part --------------
Modified: branches/4-stable/doc/en/html/about/history.html
===================================================================
--- branches/4-stable/doc/en/html/about/history.html	2020-03-28 14:18:38 UTC (rev 8647)
+++ branches/4-stable/doc/en/html/about/history.html	2020-03-28 14:26:06 UTC (rev 8648)
@@ -41,6 +41,7 @@
 
   <li>Bug fixes
     <ul>
+      <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>
       <li>Fixed memory leak when tooltip show. This bug was introduced in 4.103.</li>
       <li>Fixed support for IME feedback back and forth function. This bug was introduced in 4.103.</li>
       <li>Fixed desktop images can not be displayed on background other than main display. This bug was introduced in 4.103.</li>

Modified: branches/4-stable/doc/ja/html/about/history.html
===================================================================
--- branches/4-stable/doc/ja/html/about/history.html	2020-03-28 14:18:38 UTC (rev 8647)
+++ branches/4-stable/doc/ja/html/about/history.html	2020-03-28 14:26:06 UTC (rev 8648)
@@ -41,6 +41,7 @@
 
   <li>\x83o\x83O\x8FC\x90\xB3
     <ul>
+      <li><a href="../macro/command/yesnobox.html">yesnobox</a> \x83}\x83N\x83\x8D\x83R\x83}\x83\x93\x83h\x82ŁA\x8C\xBE\x8C\xEA\x83t\x83@\x83C\x83\x8B\x82\xF0\x93ǂݍ\x9E\x82܂Ȃ\xA2\x82Ƃ\xAB "OK" \x82\xAA\x95\\x8E\xA6\x82\xB3\x82\xEA\x82Ă\xA2\x82\xBD\x81B"yes" \x82ɏC\x90\xB3\x81B4.103\x82ŃG\x83\x93\x83o\x83O\x81B</li>
       <li>\x83c\x81[\x83\x8B\x83`\x83b\x83v\x95\\x8E\xA6\x8E\x9E\x82̃\x81\x83\x82\x83\x8A\x83\x8A\x81[\x83N\x82\xF0\x8FC\x90\xB3\x81B4.103\x82ł̃G\x83\x93\x83o\x83O\x81B</li>
       <li><a href="../usage/tips/ime.html#feedback">IME\x82̑O\x8C\xE3\x8EQ\x8Fƕϊ\xB7\x8B@\x94\</a>\x82\xAA\x93\xAE\x8D삷\x82\xE9\x82悤\x8FC\x90\xB3\x81B4.103\x82ł̃G\x83\x93\x83o\x83O\x81B</li>
       <li>\x83\x81\x83C\x83\x93\x83f\x83B\x83X\x83v\x83\x8C\x83C\x88ȊO\x82Ńf\x83X\x83N\x83g\x83b\x83v\x89摜\x82\xF0\x94w\x8Ci\x82ɕ\\x8E\xA6\x82ł\xAB\x82Ȃ\xA9\x82\xC1\x82\xBD\x82̂\xF0\x8FC\x90\xB3\x81B4.101\x82ł̃G\x83\x93\x83o\x83O\x81B</li>

Modified: branches/4-stable/teraterm/ttpmacro/msgdlg.cpp
===================================================================
--- branches/4-stable/teraterm/ttpmacro/msgdlg.cpp	2020-03-28 14:18:38 UTC (rev 8647)
+++ branches/4-stable/teraterm/ttpmacro/msgdlg.cpp	2020-03-28 14:26:06 UTC (rev 8648)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2006-2019 TeraTerm Project
+ * (C) 2006-2020 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -61,19 +61,22 @@
 
 BOOL CMsgDlg::OnInitDialog()
 {
-	static const DlgTextInfo TextInfosOk[] = {
-		{ IDOK, "BTN_OK" },
-	};
-	static const DlgTextInfo TextInfosYesNo[] = {
-		{ IDOK, "BTN_YES" },
-		{ IDCANCEL, "BTN_NO" },
-	};
 	RECT R;
 	HWND HOk;
 
+	// IDOK \x82̃f\x83t\x83H\x83\x8B\x83g "OK", \x95\\x8E\xA6
+	// IDCANCEL \x82̃f\x83t\x83H\x83\x8B\x83g "No", \x94\xF1\x95\\x8E\xA6
 	if (YesNoFlag) {
+		static const DlgTextInfo TextInfosYesNo[] = {
+			{ IDOK, "BTN_YES" },
+			{ IDCANCEL, "BTN_NO" },
+		};
+		SetDlgItemTextA(IDOK, "Yes");	// lng \x83t\x83@\x83C\x83\x8B\x82Ȃ\xB5\x91΍\xF4
 		SetDlgTexts(m_hWnd, TextInfosYesNo, _countof(TextInfosYesNo), UILanguageFile);
 	} else {
+		static const DlgTextInfo TextInfosOk[] = {
+			{ IDOK, "BTN_OK" },
+		};
 		SetDlgTexts(m_hWnd, TextInfosOk, _countof(TextInfosOk), UILanguageFile);
 	}
 


Ttssh2-commit メーリングリストの案内
Back to archive index