Revision: 10486 https://osdn.net/projects/ttssh2/scm/svn/commits/10486 Author: zmatsuo Date: 2023-01-15 00:33:22 +0900 (Sun, 15 Jan 2023) Log Message: ----------- TTDLGSetUILanguageFile() を削除 - ttpdlg.dll に UILanguageFile を渡すために使用されていた - 現在は ttpdlg.dll は ttermpro.exe に統合 - ts グローバル変数を参照するようにした Modified Paths: -------------- trunk/teraterm/teraterm/ttdialog.c trunk/teraterm/teraterm/ttdialog.h trunk/teraterm/ttpdlg/ttdlg.c trunk/teraterm/ttpdlg/ttdlg.h -------------- next part -------------- Modified: trunk/teraterm/teraterm/ttdialog.c =================================================================== --- trunk/teraterm/teraterm/ttdialog.c 2023-01-14 15:33:12 UTC (rev 10485) +++ trunk/teraterm/teraterm/ttdialog.c 2023-01-14 15:33:22 UTC (rev 10486) @@ -47,7 +47,6 @@ PChooseFontDlg ChooseFontDlg; PSetupGeneral SetupGeneral; PWindowWindow WindowWindow; -PTTDLGSetUILanguageFile TTDLGSetUILanguageFile; BOOL LoadTTDLG() { @@ -62,9 +61,7 @@ ChooseFontDlg = _ChooseFontDlg; SetupGeneral = _SetupGeneral; WindowWindow = _WindowWindow; - TTDLGSetUILanguageFile = _TTDLGSetUILanguageFile; - TTDLGSetUILanguageFile(ts.UILanguageFile); TTXGetUIHooks(); /* TTPLUG */ return TRUE; Modified: trunk/teraterm/teraterm/ttdialog.h =================================================================== --- trunk/teraterm/teraterm/ttdialog.h 2023-01-14 15:33:12 UTC (rev 10485) +++ trunk/teraterm/teraterm/ttdialog.h 2023-01-14 15:33:22 UTC (rev 10486) @@ -54,8 +54,6 @@ (HWND WndParent, PTTSet ts); typedef BOOL (PASCAL *PWindowWindow) (HWND WndParent, PBOOL Close); -typedef BOOL (PASCAL *PTTDLGSetUILanguageFile) - (char *file); extern PSetupTerminal SetupTerminal; extern PSetupWin SetupWin; @@ -68,7 +66,6 @@ extern PChooseFontDlg ChooseFontDlg; extern PSetupGeneral SetupGeneral; extern PWindowWindow WindowWindow; -extern PTTDLGSetUILanguageFile TTDLGSetUILanguageFile; /* proto types */ BOOL LoadTTDLG(); Modified: trunk/teraterm/ttpdlg/ttdlg.c =================================================================== --- trunk/teraterm/ttpdlg/ttdlg.c 2023-01-14 15:33:12 UTC (rev 10485) +++ trunk/teraterm/ttpdlg/ttdlg.c 2023-01-14 15:33:22 UTC (rev 10486) @@ -41,6 +41,7 @@ #include <stdlib.h> #include <crtdbg.h> #include <assert.h> +#include <winsock2.h> #include "tttypes.h" #include "ttlib.h" @@ -58,6 +59,7 @@ #include "compat_win.h" #include "ttlib_charset.h" #include "asprintf.h" +#include "ttwinman.h" // Oniguruma: Regular expression library #define ONIG_EXTERN extern @@ -67,7 +69,6 @@ // SFMT: SIMD-oriented Fast Mersenne Twister #include "SFMT_version_for_teraterm.h" -#include <winsock2.h> #undef EFFECT_ENABLED // \x83G\x83t\x83F\x83N\x83g\x82̗L\x8C\xF8\x89\xDB #undef TEXTURE_ENABLED // \x83e\x83N\x83X\x83`\x83\x83\x82̗L\x8C\xF8\x89\xDB @@ -81,15 +82,6 @@ #define EndDialog(p1,p2) \ TTEndDialog(p1, p2) -extern HANDLE hInst; -/* - * ttwinman.h\x82\xF0include\x82\xB7\x82\xE9\x82ƁAhInst\x82ƃV\x83\x93\x83{\x83\x8B\x8FՓ˂\xB7\x82邽\x82߁A - * cv\x82\xCCextern\x90錾\x82\xF0\x8Cʂɒlj\xC1\x82\xB7\x82\xE9\x81B - */ -extern TComVar cv; - -static char UILanguageFile[MAX_PATH]; - static const char *ProtocolFamilyList[] = { "AUTO", "IPv6", "IPv4", NULL }; static const char *NLListRcv[] = {"CR","CR+LF", "LF", "AUTO", NULL}; static const char *NLList[] = {"CR","CR+LF", "LF", NULL}; @@ -1692,7 +1684,7 @@ dlg_data->ComPortInfoPtr = ComPortInfoGet(&dlg_data->ComPortInfoCount, NULL); - SetDlgTexts(Dialog, TextInfos, _countof(TextInfos), UILanguageFile); + SetDlgTexts(Dialog, TextInfos, _countof(TextInfos), ts.UILanguageFile); // \x83t\x83@\x83C\x83\x8B\x82\xA8\x82\xE6\x82і\xBC\x91O\x95t\x82\xAB\x83p\x83C\x83v\x82̏ꍇ\x81ATCP/IP\x88\xB5\x82\xA2\x82Ƃ\xB7\x82\xE9\x81B if ( GetHNRec->PortType==IdFile || @@ -2456,7 +2448,7 @@ #endif } - SetDlgTexts(Dialog, TextInfos, _countof(TextInfos), UILanguageFile); + SetDlgTexts(Dialog, TextInfos, _countof(TextInfos), ts.UILanguageFile); // Tera Term \x96{\x91̂̃o\x81[\x83W\x83\x87\x83\x93 _snprintf_s(buf, sizeof(buf), _TRUNCATE, "Version %d.%d", TT_VERSION_MAJOR, TT_VERSION_MINOR); @@ -2846,7 +2838,7 @@ ts = (PTTSet)lParam; SetWindowLongPtr(Dialog, DWLP_USER, lParam); - SetDlgTexts(Dialog, TextInfos, _countof(TextInfos), UILanguageFile); + SetDlgTexts(Dialog, TextInfos, _countof(TextInfos), ts->UILanguageFile); SendDlgItemMessageA(Dialog, IDC_GENPORT, CB_ADDSTRING, 0, (LPARAM)"TCP/IP"); @@ -2996,7 +2988,7 @@ Close = (PBOOL)lParam; SetWindowLongPtr(Dialog, DWLP_USER, lParam); - SetDlgTexts(Dialog, TextInfos, _countof(TextInfos), UILanguageFile); + SetDlgTexts(Dialog, TextInfos, _countof(TextInfos), ts.UILanguageFile); SetWinList(GetParent(Dialog),Dialog,IDC_WINLISTLIST); @@ -3229,9 +3221,3 @@ WndParent, WinListDlg, (LPARAM)Close); } - -BOOL WINAPI _TTDLGSetUILanguageFile(char *file) -{ - strncpy_s(UILanguageFile, sizeof(UILanguageFile), file, _TRUNCATE); - return TRUE; -} Modified: trunk/teraterm/ttpdlg/ttdlg.h =================================================================== --- trunk/teraterm/ttpdlg/ttdlg.h 2023-01-14 15:33:12 UTC (rev 10485) +++ trunk/teraterm/ttpdlg/ttdlg.h 2023-01-14 15:33:22 UTC (rev 10486) @@ -40,4 +40,4 @@ BOOL WINAPI _ChooseFontDlg(HWND WndParent, LPLOGFONTA LogFont, PTTSet ts); BOOL WINAPI _SetupGeneral(HWND WndParent, PTTSet ts); BOOL WINAPI _WindowWindow(HWND WndParent, PBOOL Close); -BOOL WINAPI _TTDLGSetUILanguageFile(char *file); +//BOOL WINAPI _TTDLGSetUILanguageFile(char *file);