• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision8947 (tree)
Zeit2020-10-03 00:46:12
Autorzmatsuo

Log Message

protodlg で PFileVar, PTTSet に依存しないようにした

Ändern Zusammenfassung

Diff

--- trunk/teraterm/teraterm/filesys.cpp (revision 8946)
+++ trunk/teraterm/teraterm/filesys.cpp (revision 8947)
@@ -663,7 +663,11 @@
663663 ProtoVar = NULL;
664664 return FALSE;
665665 }
666- pd->Create(hInst, HVTWin, fv, &ts);
666+ CProtoDlgInfo info;
667+ info.UILanguageFile = ts.UILanguageFile;
668+ info.HMainWin = fv->HMainWin;
669+ pd->Create(hInst, HVTWin, &info);
670+ fv->HWin = pd->m_hWnd;
667671
668672 (*ProtoInit)(ProtoId,FileVar,ProtoVar,&cv,&ts);
669673
--- trunk/teraterm/teraterm/protodlg.cpp (revision 8946)
+++ trunk/teraterm/teraterm/protodlg.cpp (revision 8947)
@@ -31,7 +31,7 @@
3131 #include "teraterm.h"
3232 #include "tt_res.h"
3333 #include "tttypes.h"
34-#include "ttftypes.h"
34+//#include "ttftypes.h"
3535 #include "ttlib.h"
3636 #include "dlglib.h"
3737 #include "protodlg.h"
@@ -39,17 +39,16 @@
3939 /////////////////////////////////////////////////////////////////////////////
4040 // CProtoDlg dialog
4141
42-BOOL CProtoDlg::Create(HINSTANCE hInstance, HWND hParent, PFileVar pfv, PTTSet pts)
42+BOOL CProtoDlg::Create(HINSTANCE hInstance, HWND hParent, const CProtoDlgInfo *info)
4343 {
44- m_pts = pts;
45- fv = pfv;
44+ UILanguageFile = info->UILanguageFile;
45+ HMainWin = info->HMainWin;
4646
4747 BOOL Ok = TTCDialog::Create(hInstance, hParent, IDD_PROTDLG);
48- fv->HWin = GetSafeHwnd();
49-
5048 return Ok;
5149 }
5250
51+
5352 /////////////////////////////////////////////////////////////////////////////
5453 // CProtoDlg message handler
5554
@@ -63,7 +62,7 @@
6362 { IDC_PROT_ELAPSED, "DLG_PROT_ELAPSED" },
6463 { IDCANCEL, "BTN_CANCEL" },
6564 };
66- SetDlgTexts(m_hWnd, TextInfos, _countof(TextInfos), m_pts->UILanguageFile);
65+ SetDlgTexts(m_hWnd, TextInfos, _countof(TextInfos), UILanguageFile);
6766 return TRUE;
6867 }
6968
@@ -70,7 +69,7 @@
7069
7170 BOOL CProtoDlg::OnCancel()
7271 {
73- ::PostMessage(fv->HMainWin,WM_USER_PROTOCANCEL,0,0);
72+ ::PostMessage(HMainWin,WM_USER_PROTOCANCEL,0,0);
7473 return TRUE;
7574 }
7675
@@ -78,7 +77,7 @@
7877 {
7978 switch (LOWORD(wParam)) {
8079 case IDCANCEL:
81- ::PostMessage(fv->HMainWin,WM_USER_PROTOCANCEL,0,0);
80+ ::PostMessage(HMainWin,WM_USER_PROTOCANCEL,0,0);
8281 return TRUE;
8382 default:
8483 return (TTCDialog::OnCommand(wParam,lParam));
--- trunk/teraterm/teraterm/protodlg.h (revision 8946)
+++ trunk/teraterm/teraterm/protodlg.h (revision 8947)
@@ -29,14 +29,19 @@
2929
3030 /* TERATERM.EXE, file-transfer-protocol dialog box */
3131 #include "tmfc.h"
32-#include "tttypes.h"
3332
3433 // CProtoDlg dialog
34+
35+typedef struct {
36+ const char *UILanguageFile;
37+ HWND HMainWin;
38+} CProtoDlgInfo;
39+
3540 class CProtoDlg : public TTCDialog
3641 {
3742
3843 public:
39- BOOL Create(HINSTANCE hInstance, HWND hParent, PFileVar pfv, PTTSet pts);
44+ BOOL Create(HINSTANCE hInstance, HWND hParent, const CProtoDlgInfo *info);
4045
4146 protected:
4247 virtual BOOL OnCancel();
@@ -44,8 +49,8 @@
4449 virtual BOOL OnInitDialog();
4550 virtual BOOL PostNcDestroy();
4651 private:
47- PFileVar fv;
48- TTTSet *m_pts;
52+ const char *UILanguageFile;
53+ HWND HMainWin;
4954 };
5055
5156 typedef CProtoDlg *PProtoDlg;
Show on old repository browser