[Ttssh2-commit] [3558] ConfirmChangePasteStringFile の設定をGUIから行えるようにした。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 7月 1日 (水) 20:28:04 JST


Revision: 3558
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=3558
Author:   yutakapon
Date:     2009-07-01 20:28:04 +0900 (Wed, 01 Jul 2009)

Log Message:
-----------
ConfirmChangePasteStringFile の設定をGUIから行えるようにした。

Modified Paths:
--------------
    trunk/teraterm/common/tt_res.h
    trunk/teraterm/teraterm/addsetting.cpp
    trunk/teraterm/teraterm/ttermpro.rc


-------------- next part --------------
Modified: trunk/teraterm/common/tt_res.h
===================================================================
--- trunk/teraterm/common/tt_res.h	2009-06-30 22:54:45 UTC (rev 3557)
+++ trunk/teraterm/common/tt_res.h	2009-07-01 11:28:04 UTC (rev 3558)
@@ -1,6 +1,6 @@
 //{{NO_DEPENDENCIES}}
 // Microsoft Visual C++ generated include file.
-// Used by t:\ttssh2\teraterm\teraterm\ttermpro.rc
+// Used by c:\usr\ttssh2\teraterm\teraterm\ttermpro.rc
 //
 #define IDI_TTERM                       100
 #define IDR_ACC                         100
@@ -132,6 +132,9 @@
 #define IDC_ACCEPT_TITLE_CHANGING_LABEL 2517
 #define IDC_PASTEDELAY_LABEL            2518
 #define IDC_PASTEDELAY_LABEL2           2519
+#define IDC_CONFIRM_STRING_FILE         2520
+#define IDC_CONFIRM_STRING_FILE_PATH    2521
+#define IDC_CONFIRM_STRING_FILE_STATIC  2522
 #define ID_ACC_SENDBREAK                50001
 #define ID_ACC_COPY                     50002
 #define ID_ACC_NEWCONNECTION            50003
@@ -224,7 +227,7 @@
 #define _APS_NO_MFC                     1
 #define _APS_NEXT_RESOURCE_VALUE        121
 #define _APS_NEXT_COMMAND_VALUE         52030
-#define _APS_NEXT_CONTROL_VALUE         2519
+#define _APS_NEXT_CONTROL_VALUE         2523
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif

Modified: trunk/teraterm/teraterm/addsetting.cpp
===================================================================
--- trunk/teraterm/teraterm/addsetting.cpp	2009-06-30 22:54:45 UTC (rev 3557)
+++ trunk/teraterm/teraterm/addsetting.cpp	2009-07-01 11:28:04 UTC (rev 3558)
@@ -289,6 +289,7 @@
 {
 	char uimsg[MAX_UIMSG];
 	CButton *btn, *btn2;
+	CEdit *edit;
 	char buf[64];
 
 	CPropertyPage::OnInitDialog();
@@ -326,6 +327,9 @@
 	GetDlgItemText(IDC_CONFIRM_CHANGE_PASTE, uimsg, sizeof(uimsg));
 	get_lang_msg("DLG_TAB_COPYPASTE_CONFIRM_CHANGE_PASTE", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
 	SetDlgItemText(IDC_CONFIRM_CHANGE_PASTE, ts.UIMsg);
+	GetDlgItemText(IDC_CONFIRM_STRING_FILE_STATIC, uimsg, sizeof(uimsg));
+	get_lang_msg("IDC_CONFIRM_STRING_FILE_STATIC", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
+	SetDlgItemText(IDC_CONFIRM_STRING_FILE_STATIC, ts.UIMsg);
 	GetDlgItemText(IDC_DELIMITER, uimsg, sizeof(uimsg));
 	get_lang_msg("DLG_TAB_COPYPASTE_DELIMITER", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
 	SetDlgItemText(IDC_DELIMITER, ts.UIMsg);
@@ -361,6 +365,18 @@
 	btn = (CButton *)GetDlgItem(IDC_CONFIRM_CHANGE_PASTE);
 	btn->SetCheck(ts.ConfirmChangePaste);
 
+	// ƒtƒ@ƒCƒ‹ƒpƒX
+	SetDlgItemText(IDC_CONFIRM_STRING_FILE, ts.ConfirmChangePasteStringFile);
+	edit = (CEdit *)GetDlgItem(IDC_CONFIRM_STRING_FILE);
+	btn = (CButton *)GetDlgItem(IDC_CONFIRM_STRING_FILE_PATH);
+	if (ts.ConfirmChangePaste) {
+		edit->EnableWindow(TRUE);
+		btn->EnableWindow(TRUE);
+	} else {
+		edit->EnableWindow(FALSE);
+		btn->EnableWindow(FALSE);
+	}
+
 	// (6)delimiter characters
 	SetDlgItemText(IDC_DELIM_LIST, ts.DelimList);
 
@@ -377,6 +393,8 @@
 BOOL CCopypastePropPageDlg::OnCommand(WPARAM wParam, LPARAM lParam)
 {
 	CButton *btn, *btn2;
+	CEdit *edit;
+	char uimsg[MAX_UIMSG];
 
 	switch (wParam) {
 		case IDC_DISABLE_PASTE_RBUTTON | (BN_CLICKED << 16):
@@ -388,6 +406,41 @@
 				btn2->EnableWindow(TRUE);
 			}
 			return TRUE;
+
+		case IDC_CONFIRM_CHANGE_PASTE | (BN_CLICKED << 16):
+			btn2 = (CButton *)GetDlgItem(IDC_CONFIRM_CHANGE_PASTE);
+			btn = (CButton *)GetDlgItem(IDC_CONFIRM_STRING_FILE_PATH);
+			edit = (CEdit *)GetDlgItem(IDC_CONFIRM_STRING_FILE);
+			if (btn2->GetCheck()) {
+				edit->EnableWindow(TRUE);
+				btn->EnableWindow(TRUE);
+			} else {
+				edit->EnableWindow(FALSE);
+				btn->EnableWindow(FALSE);
+			}
+			return TRUE;
+
+		case IDC_CONFIRM_STRING_FILE_PATH | (BN_CLICKED << 16):
+			{
+				OPENFILENAME ofn;
+
+				ZeroMemory(&ofn, sizeof(ofn));
+				ofn.lStructSize = get_OPENFILENAME_SIZE();
+				ofn.hwndOwner = GetSafeHwnd();
+				get_lang_msg("FILEDLG_SELECT_CONFIRM_STRING_APP_FILTER", ts.UIMsg, sizeof(ts.UIMsg),
+				             "txt(*.txt)\\0*.txt\\0all(*.*)\\0*.*\\0\\0", ts.UILanguageFile);
+				ofn.lpstrFilter = ts.UIMsg;
+				ofn.lpstrFile = ts.ConfirmChangePasteStringFile;
+				ofn.nMaxFile = sizeof(ts.ConfirmChangePasteStringFile);
+				get_lang_msg("FILEDLG_SELECT_CONFIRM_STRING_APP_TITLE", uimsg, sizeof(uimsg),
+				             "Choose a file including strings for ConfirmChangePaste", ts.UILanguageFile);
+				ofn.lpstrTitle = uimsg;
+				ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_FORCESHOWHIDDEN | OFN_HIDEREADONLY;
+				if (GetOpenFileName(&ofn) != 0) {
+					SetDlgItemText(IDC_CONFIRM_STRING_FILE, ts.ConfirmChangePasteStringFile);
+				}
+			}
+			return TRUE;
 	}
 
 	return CPropertyPage::OnCommand(wParam, lParam);
@@ -418,6 +471,7 @@
 	// (5)IDC_CONFIRM_CHANGE_PASTE
 	btn = (CButton *)GetDlgItem(IDC_CONFIRM_CHANGE_PASTE);
 	ts.ConfirmChangePaste = btn->GetCheck();
+	GetDlgItemText(IDC_CONFIRM_STRING_FILE, ts.ConfirmChangePasteStringFile, sizeof(ts.ConfirmChangePasteStringFile));
 
 	// (6)
 	GetDlgItemText(IDC_DELIM_LIST, ts.DelimList, sizeof(ts.DelimList));

Modified: trunk/teraterm/teraterm/ttermpro.rc
===================================================================
--- trunk/teraterm/teraterm/ttermpro.rc	2009-06-30 22:54:45 UTC (rev 3557)
+++ trunk/teraterm/teraterm/ttermpro.rc	2009-07-01 11:28:04 UTC (rev 3558)
@@ -248,11 +248,14 @@
                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,40,190,10
     CONTROL         "Select&OnlyByLButton",IDC_SELECT_LBUTTON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,55,200,10
     CONTROL         "ConfirmChange&Paste",IDC_CONFIRM_CHANGE_PASTE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,70,200,10
-    LTEXT           "Del&imiter Characters",IDC_DELIMITER,11,85,65,10
-    EDITTEXT        IDC_DELIM_LIST,80,83,130,12,ES_AUTOHSCROLL
-    LTEXT           "P&asteDelayPerLine",IDC_PASTEDELAY_LABEL,11,100,70,10
-    EDITTEXT        IDC_PASTEDELAY_EDIT,85,98,24,12,ES_AUTOHSCROLL | ES_NUMBER
-    LTEXT           "ms",IDC_PASTEDELAY_LABEL2,113,100,23,10
+    LTEXT           "Del&imiter Characters",IDC_DELIMITER,11,101,65,10
+    EDITTEXT        IDC_DELIM_LIST,80,99,130,12,ES_AUTOHSCROLL
+    LTEXT           "P&asteDelayPerLine",IDC_PASTEDELAY_LABEL,11,116,70,10
+    EDITTEXT        IDC_PASTEDELAY_EDIT,85,114,24,12,ES_AUTOHSCROLL | ES_NUMBER
+    LTEXT           "ms",IDC_PASTEDELAY_LABEL2,113,116,23,10
+    LTEXT           "StringFile",IDC_CONFIRM_STRING_FILE_STATIC,21,82,30,8
+    EDITTEXT        IDC_CONFIRM_STRING_FILE,55,81,106,14,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",IDC_CONFIRM_STRING_FILE_PATH,165,82,14,14
 END
 
 



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