[Ttssh2-commit] [4931] 言語ファイルの変更でメニューをリロードするようにし、再起動を促さないようにした

svnno****@sourc***** svnno****@sourc*****
2012年 5月 5日 (土) 21:40:02 JST


Revision: 4931
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=4931
Author:   maya
Date:     2012-05-05 21:40:02 +0900 (Sat, 05 May 2012)
Log Message:
-----------
言語ファイルの変更でメニューをリロードするようにし、再起動を促さないようにした
# HTEKWin に PostMessage できないので、開いたままの TEK Window のメニューはリロードされない

Modified Paths:
--------------
    trunk/doc/en/html/about/history.html
    trunk/doc/ja/html/about/history.html
    trunk/teraterm/ttpdlg/ttdlg.c

-------------- next part --------------
Modified: trunk/doc/en/html/about/history.html
===================================================================
--- trunk/doc/en/html/about/history.html	2012-05-04 14:39:22 UTC (rev 4930)
+++ trunk/doc/en/html/about/history.html	2012-05-05 12:40:02 UTC (rev 4931)
@@ -70,7 +70,7 @@
           <li>added the <a href="../macro/command/fileunlock.html">fileunlock</a> command.</li>
           <li>added the third argument _timezone_ at the <a href="../macro/command/gettime.html">gettime</a> and <a href="../macro/command/getdate.html">getdate</a> command.</li>
         </ul></li>
-      <li>added the LanguageUI entry on the <a href="..\menu\setup-general.html">General setup dialog</a>. Also, a user will be confirmed whether Tera Term is be relaunched.</li>
+      <li>added the LanguageUI entry on the <a href="..\menu\setup-general.html">General setup dialog</a>.</li>
       <li>A message dialog is shown when the cygterm.cfg has been saved on the Cygwin tab of the <a href="../menu/setup-additional.html">Additional settings dialog</a>.</li>
     </ul>
   </li>

Modified: trunk/doc/ja/html/about/history.html
===================================================================
--- trunk/doc/ja/html/about/history.html	2012-05-04 14:39:22 UTC (rev 4930)
+++ trunk/doc/ja/html/about/history.html	2012-05-05 12:40:02 UTC (rev 4931)
@@ -70,7 +70,7 @@
           <li><a href="../macro/command/fileunlock.html">fileunlock</a>\x83R\x83}\x83\x93\x83h\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
           <li><a href="../macro/command/gettime.html">gettime</a>, <a href="../macro/command/getdate.html">getdate</a>\x83R\x83}\x83\x93\x83h\x82̑\xE63\x88\xF8\x90\x94\x82Ƀ^\x83C\x83\x80\x83]\x81[\x83\x93\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
         </ul></li>
-      <li><a href="..\menu\setup-general.html">General setup\x83_\x83C\x83A\x83\x8D\x83O</a>\x82Ō\xBE\x8C\xEA\x83t\x83@\x83C\x83\x8B\x82\xF0\x8Ew\x92\xE8\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B\x90ݒ\xE8\x95ύX\x8C\xE3\x81A\x8DċN\x93\xAE\x82\xB7\x82邩\x82\xF0\x96₢\x8D\x87\x82킹\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
+      <li><a href="..\menu\setup-general.html">General setup\x83_\x83C\x83A\x83\x8D\x83O</a>\x82Ō\xBE\x8C\xEA\x83t\x83@\x83C\x83\x8B\x82\xF0\x8Ew\x92\xE8\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
       <li><a href="../menu/setup-additional.html">Additional settings\x83_\x83C\x83A\x83\x8D\x83O</a>\x82\xCCCygwin\x83^\x83u\x82ŁA\x90ݒ\xE8\x95ۑ\xB6\x82ł\xAB\x82\xBD\x8Fꍇ\x81A\x83\x81\x83b\x83Z\x81[\x83W\x83_\x83C\x83A\x83\x8D\x83O\x82\xF0\x95\\x8E\xA6\x82\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
     </ul>
   </li>

Modified: trunk/teraterm/ttpdlg/ttdlg.c
===================================================================
--- trunk/teraterm/ttpdlg/ttdlg.c	2012-05-04 14:39:22 UTC (rev 4930)
+++ trunk/teraterm/ttpdlg/ttdlg.c	2012-05-05 12:40:02 UTC (rev 4931)
@@ -3216,16 +3216,21 @@
 						// \x8C\xBE\x8C\xEA\x83t\x83@\x83C\x83\x8B\x82\xAA\x95ύX\x82\xB3\x82\xEA\x82Ă\xA2\x82\xBD\x8Fꍇ
 						w = (WORD)GetCurSel(Dialog, IDC_GENLANG_UI);
 						if (w != langui_sel) {
+							char CurDir[MAX_PATH];
+
 							_snprintf_s(ts->UILanguageFile_ini, sizeof(ts->UILanguageFile_ini), _TRUNCATE, 
-								"%s/%s", LANG_PATH, LangUIList[w - 1]);
+								"%s\\%s", LANG_PATH, LangUIList[w - 1]);
 
-							// re-launch
-							RestartTeraTerm(GetParent(Dialog), ts);
+							GetCurrentDirectory(sizeof(CurDir), CurDir);
+							SetCurrentDirectory(ts->HomeDir);
+							_fullpath(ts->UILanguageFile, ts->UILanguageFile_ini, sizeof(ts->UILanguageFile));
+							SetCurrentDirectory(CurDir);
 						}
 					}
 
-					// TTXKanjiMenu \x82̂\xBD\x82߂ɁAOK \x89\x9F\x89\xBA\x8E\x9E\x82Ƀ\x81\x83j\x83\x85\x81[\x8Dĕ`\x89\xE6\x82\xCC
-					// \x83\x81\x83b\x83Z\x81[\x83W\x82\xF0\x94\xF2\x82΂\xB7\x82悤\x82ɂ\xB5\x82\xBD\x81B (2007.7.14 maya)
+					// TTXKanjiMenu \x82\xCD Language \x82\xF0\x8C\xA9\x82ă\x81\x83j\x83\x85\x81[\x82\xF0\x95\\x8E\xA6\x82\xB7\x82\xE9\x82̂ŁA\x95ύX\x82̉”\\x90\xAB\x82\xAA\x82\xA0\x82\xE9
+					// OK \x89\x9F\x89\xBA\x8E\x9E\x82Ƀ\x81\x83j\x83\x85\x81[\x8Dĕ`\x89\xE6\x82̃\x81\x83b\x83Z\x81[\x83W\x82\xF0\x94\xF2\x82΂\xB7\x82悤\x82ɂ\xB5\x82\xBD\x81B (2007.7.14 maya)
+					// \x8C\xBE\x8C\xEA\x83t\x83@\x83C\x83\x8B\x82̕ύX\x8E\x9E\x82Ƀ\x81\x83j\x83\x85\x81[\x82̍ĕ`\x89悪\x95K\x97v (2012.5.5 maya)
 					PostMessage(GetParent(Dialog),WM_USER_CHANGEMENU,0,0);
 
 					EndDialog(Dialog, 1);



Ttssh2-commit メーリングリストの案内