[Ttssh2-commit] [3306] 複数行のデータをペーストするとき、改行ごとに遅延させる時間を設定できるようにした。

svnno****@sourc***** svnno****@sourc*****
2009年 4月 12日 (日) 21:45:43 JST


Revision: 3306
          http://svn.sourceforge.jp/view?root=ttssh2&view=rev&rev=3306
Author:   maya
Date:     2009-04-12 21:45:43 +0900 (Sun, 12 Apr 2009)

Log Message:
-----------
複数行のデータをペーストするとき、改行ごとに遅延させる時間を設定できるようにした。
  http://sourceforge.jp/ticket/browse.php?group_id=1412&tid=15575
  500バイトごとに 10ms 待つ workaround (http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?view=rev&root=ttssh2&revision=2578) は削除した。

Modified Paths:
--------------
    trunk/doc/en/html/about/history.html
    trunk/doc/en/html/menu/setup-additional.html
    trunk/doc/ja/html/about/history.html
    trunk/doc/ja/html/menu/setup-additional.html
    trunk/installer/release/TERATERM.INI
    trunk/installer/release/lang/English.lng
    trunk/installer/release/lang/German.lng
    trunk/installer/release/lang/Japanese.lng
    trunk/installer/teraterm.iss
    trunk/teraterm/common/tt_res.h
    trunk/teraterm/common/tttypes.h
    trunk/teraterm/teraterm/addsetting.cpp
    trunk/teraterm/teraterm/clipboar.c
    trunk/teraterm/teraterm/ttermpro.rc
    trunk/teraterm/ttpset/ttset.c


-------------- next part --------------
Modified: trunk/doc/en/html/about/history.html
===================================================================
--- trunk/doc/en/html/about/history.html	2009-04-11 10:07:33 UTC (rev 3305)
+++ trunk/doc/en/html/about/history.html	2009-04-12 12:45:43 UTC (rev 3306)
@@ -38,6 +38,10 @@
          NOTE: Input ^[ by using Control-V Control-[.
         </pre>
       </li>
+      <!--li>•¡”s‚Ì“\‚è•t‚¯ŽžA‰üs‚²‚Æ‚É’x‰„‚·‚鎞ŠÔ‚ðÝ’è‚Å‚«‚é‚悤‚É‚µ‚½BThe default is 10(msec).
+        <ul>
+          <li><a href="../menu/setup-additional.html">Additional settings ƒ_ƒCƒAƒƒO</a>‚Őݒè’l‚ð•ÏX‚Å‚«‚é‚悤‚É‚µ‚½B</li>
+        </ul></li-->
       <li>added a new optional setting that can disable the menu for "Duplicate session".
         <ul>
           <li>added the <a href="../setup/teraterm-misc.html#DisableMenuSendBreak">DisableMenuSendBreak</a> in the teraterm.ini file. The default is off.</li>

Modified: trunk/doc/en/html/menu/setup-additional.html
===================================================================
--- trunk/doc/en/html/menu/setup-additional.html	2009-04-11 10:07:33 UTC (rev 3305)
+++ trunk/doc/en/html/menu/setup-additional.html	2009-04-12 12:45:43 UTC (rev 3306)
@@ -102,6 +102,11 @@
 	Inludes delimiter characters for the word selection.
       </dd>
 
+      <dt>PasteDelayPerLine</dt>
+      <!--dd>
+	•¡”s‚̃f[ƒ^‚ð“\‚è•t‚¯‚é‚Æ‚«A‰üs‚ªŒ»‚ê‚邲‚ƂɃf[ƒ^‚Ì‘—M‚ð’x‰„‚³‚¹‚邱‚Æ‚ª‚Å‚«‚Ü‚·B’x‰„‚·‚鎞ŠÔ‚ðƒ~ƒŠ•b‚Őݒ肵‚Ü‚·B
+      </dd-->
+
     </dl>
 
     <h2>"Visual" tab</h2>

Modified: trunk/doc/ja/html/about/history.html
===================================================================
--- trunk/doc/ja/html/about/history.html	2009-04-11 10:07:33 UTC (rev 3305)
+++ trunk/doc/ja/html/about/history.html	2009-04-12 12:45:43 UTC (rev 3306)
@@ -38,6 +38,10 @@
          ’: ^[ ‚ÍControl-V Control-[‚Å“ü—Í‚·‚é
         </pre>
       </li>
+      <li>•¡”s‚Ì“\‚è•t‚¯ŽžA‰üs‚²‚Æ‚É’x‰„‚·‚鎞ŠÔ‚ðÝ’è‚Å‚«‚é‚悤‚É‚µ‚½BƒfƒtƒHƒ‹ƒg‚Í 10(ƒ~ƒŠ•b)B
+        <ul>
+          <li><a href="../menu/setup-additional.html">Additional settings ƒ_ƒCƒAƒƒO</a>‚Őݒè’l‚ð•ÏX‚Å‚«‚é‚悤‚É‚µ‚½B</li>
+        </ul></li>
       <li>ƒƒjƒ…[‚Ì Send break ‚𖳌ø‚É‚Å‚«‚é‚悤‚É‚µ‚½B
         <ul>
           <li>teraterm.ini ‚É <a href="../setup/teraterm-misc.html#DisableMenuSendBreak">DisableMenuSendBreak</a> ƒGƒ“ƒgƒŠ‚ð’ljÁ‚µ‚½BƒfƒtƒHƒ‹ƒg‚Í offB</li>

Modified: trunk/doc/ja/html/menu/setup-additional.html
===================================================================
--- trunk/doc/ja/html/menu/setup-additional.html	2009-04-11 10:07:33 UTC (rev 3305)
+++ trunk/doc/ja/html/menu/setup-additional.html	2009-04-12 12:45:43 UTC (rev 3306)
@@ -101,6 +101,11 @@
 	’PŒê‘I‘ð‚Ì‹æØ‚蕶Žš‚ðÝ’肵‚Ü‚·B
       </dd>
 
+      <dt>PasteDelayPerLine</dt>
+      <dd>
+	•¡”s‚̃f[ƒ^‚ð“\‚è•t‚¯‚é‚Æ‚«A‰üs‚ªŒ»‚ê‚邲‚ƂɃf[ƒ^‚Ì‘—M‚ð’x‰„‚³‚¹‚邱‚Æ‚ª‚Å‚«‚Ü‚·B’x‰„‚·‚鎞ŠÔ‚ðƒ~ƒŠ•b‚Őݒ肵‚Ü‚·B
+      </dd>
+
     </dl>
 
     <h2>"Visual" ƒ^ƒu</h2>

Modified: trunk/installer/release/TERATERM.INI
===================================================================
--- trunk/installer/release/TERATERM.INI	2009-04-11 10:07:33 UTC (rev 3305)
+++ trunk/installer/release/TERATERM.INI	2009-04-12 12:45:43 UTC (rev 3306)
@@ -412,6 +412,9 @@
 ; Direct pass-thru printing
 PassThruPort=
 
+; Delay for paste per each lines (in msec)
+PasteDelayPerLine=10
+
 ; Printer font
 PrnFont=
 

Modified: trunk/installer/release/lang/English.lng
===================================================================
--- trunk/installer/release/lang/English.lng	2009-04-11 10:07:33 UTC (rev 3305)
+++ trunk/installer/release/lang/English.lng	2009-04-12 12:45:43 UTC (rev 3306)
@@ -167,6 +167,8 @@
 DLG_TAB_COPYPASTE_SELECTLBUTTON=Select&OnlyByLButton
 DLG_TAB_COPYPASTE_CONFIRM_CHANGE_PASTE=ConfirmChange&Paste
 DLG_TAB_COPYPASTE_DELIMITER=Del&imiter Characters
+DLG_TAB_COPYPASTE_PASTEDELAY=P&asteDelayPerLine
+DLG_TAB_COPYPASTE_PASTEDELAY2=ms
 
 DLG_TAB_VISUAL_ALHPA=&AlphaBlend
 DLG_TAB_VISUAL_ETERM=&Eterm lookfeel

Modified: trunk/installer/release/lang/German.lng
===================================================================
--- trunk/installer/release/lang/German.lng	2009-04-11 10:07:33 UTC (rev 3305)
+++ trunk/installer/release/lang/German.lng	2009-04-12 12:45:43 UTC (rev 3306)
@@ -166,6 +166,8 @@
 DLG_TAB_COPYPASTE_SELECTLBUTTON=&Auswahl nur über Button
 DLG_TAB_COPYPASTE_CONFIRM_CHANGE_PASTE=ConfirmChange&Paste
 DLG_TAB_COPYPASTE_DELIMITER=&Bergrenzungszeichen
+DLG_TAB_COPYPASTE_PASTEDELAY=P&asteDelayPerLine
+DLG_TAB_COPYPASTE_PASTEDELAY2=ms
 
 DLG_TAB_VISUAL_ALHPA=&Transparenz
 DLG_TAB_VISUAL_ETERM=&Eterm Aussehen

Modified: trunk/installer/release/lang/Japanese.lng
===================================================================
--- trunk/installer/release/lang/Japanese.lng	2009-04-11 10:07:33 UTC (rev 3305)
+++ trunk/installer/release/lang/Japanese.lng	2009-04-12 12:45:43 UTC (rev 3306)
@@ -167,6 +167,8 @@
 DLG_TAB_COPYPASTE_SELECTLBUTTON=¶ƒNƒŠƒbƒN‚Å‚Ì‚Ý‘I‘ð‚ðŠJŽn‚·‚é(&O)
 DLG_TAB_COPYPASTE_CONFIRM_CHANGE_PASTE=ŠëŒ¯‚ȃNƒŠƒbƒvƒ{[ƒh‚Ì“\‚è•t‚¯‚ðŠm”F‚·‚é(&P)
 DLG_TAB_COPYPASTE_DELIMITER=‹æØ‚蕶Žš(&I)
+DLG_TAB_COPYPASTE_PASTEDELAY=“\‚è•t‚¯‚̍sŠÔ’x‰„(&A)
+DLG_TAB_COPYPASTE_PASTEDELAY2=ƒ~ƒŠ•b
 
 DLG_TAB_VISUAL_ALHPA=”¼“§–¾“x(&A)
 DLG_TAB_VISUAL_ETERM=&Eterm•—‚É‚·‚é

Modified: trunk/installer/teraterm.iss
===================================================================
--- trunk/installer/teraterm.iss	2009-04-11 10:07:33 UTC (rev 3305)
+++ trunk/installer/teraterm.iss	2009-04-12 12:45:43 UTC (rev 3306)
@@ -141,6 +141,8 @@
 Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\cyglaunch; Filename: {app}\cyglaunch.exe; WorkingDir: {app}; IconFilename: {app}\cyglaunch.exe; Components: cygterm; Tasks: quickcyglaunch; IconIndex: 0; Flags: createonlyiffileexists
 
 [INI]
+Filename: {app}\teraterm.ini; Section: Tera Term; Key: PasteDelayPerLine; String: 10; Flags: createkeyifdoesntexist; Components: TeraTerm
+Filename: {userdocs}\teraterm.ini; Section: Tera Term; Key: PasteDelayPerLine; String: 10; Flags: createkeyifdoesntexist; Check: isUserIniExists; Components: TeraTerm
 Filename: {app}\teraterm.ini; Section: Tera Term; Key: DisableAcceleratorDuplicateSession; String: off; Flags: createkeyifdoesntexist; Components: TeraTerm
 Filename: {userdocs}\teraterm.ini; Section: Tera Term; Key: DisableAcceleratorDuplicateSession; String: off; Flags: createkeyifdoesntexist; Check: isUserIniExists; Components: TeraTerm
 Filename: {app}\teraterm.ini; Section: Tera Term; Key: ClearScreenOnCloseConnection; String: off; Flags: createkeyifdoesntexist; Components: TeraTerm

Modified: trunk/teraterm/common/tt_res.h
===================================================================
--- trunk/teraterm/common/tt_res.h	2009-04-11 10:07:33 UTC (rev 3305)
+++ trunk/teraterm/common/tt_res.h	2009-04-12 12:45:43 UTC (rev 3306)
@@ -1,6 +1,6 @@
 //{{NO_DEPENDENCIES}}
 // Microsoft Visual C++ generated include file.
-// Used by c:\usr\cvs\teraterm\teraterm\ttermpro.rc
+// Used by t:\ttssh2\teraterm\teraterm\ttermpro.rc
 //
 #define IDI_TTERM                       100
 #define IDR_ACC                         100
@@ -122,6 +122,7 @@
 #define IDC_EDIT1                       2510
 #define IDC_EDIT                        2510
 #define IDC_SCROLL_LINE                 2510
+#define IDC_PASTEDELAY_EDIT             2510
 #define IDC_CLIPBOARD_INFO              2511
 #define IDC_CHECK1                      2512
 #define IDC_CONFIRM_CHANGE_PASTE        2512
@@ -129,6 +130,8 @@
 #define IDC_TRANSPROGRESS               2514
 #define IDC_PROTOPROGRESS               2515
 #define IDC_ACCEPT_TITLE_CHANGING_LABEL 2517
+#define IDC_PASTEDELAY_LABEL            2518
+#define IDC_PASTEDELAY_LABEL2           2519
 #define ID_ACC_SENDBREAK                50001
 #define ID_ACC_COPY                     50002
 #define ID_ACC_NEWCONNECTION            50003
@@ -221,7 +224,7 @@
 #define _APS_NO_MFC                     1
 #define _APS_NEXT_RESOURCE_VALUE        121
 #define _APS_NEXT_COMMAND_VALUE         52030
-#define _APS_NEXT_CONTROL_VALUE         2518
+#define _APS_NEXT_CONTROL_VALUE         2519
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif

Modified: trunk/teraterm/common/tttypes.h
===================================================================
--- trunk/teraterm/common/tttypes.h	2009-04-11 10:07:33 UTC (rev 3305)
+++ trunk/teraterm/common/tttypes.h	2009-04-12 12:45:43 UTC (rev 3306)
@@ -453,6 +453,7 @@
 	WORD DisableMenuSendBreak;
 	WORD ClearScreenOnCloseConnection;
 	WORD DisableAcceleratorDuplicateSession;
+	int PasteDelayPerLine;
 };
 
 typedef struct tttset TTTSet, *PTTSet;
@@ -891,6 +892,7 @@
  *   added tttset.DisableAcceleratorMenu.
  *   added tttset.ClearScreenOnCloseConnection.
  *   added tttset.DisableAcceleratorDuplicateSession.
+ *   added tttset.PasteDelayPerLine.
  *
  * - At version 4.62, ttset_memfilemap was replaced with ttset_memfilemap_10.
  *   added tttset.DisableMouseTrackingByCtrl.

Modified: trunk/teraterm/teraterm/addsetting.cpp
===================================================================
--- trunk/teraterm/teraterm/addsetting.cpp	2009-04-11 10:07:33 UTC (rev 3305)
+++ trunk/teraterm/teraterm/addsetting.cpp	2009-04-12 12:45:43 UTC (rev 3306)
@@ -289,6 +289,7 @@
 {
 	char uimsg[MAX_UIMSG];
 	CButton *btn, *btn2;
+	char buf[64];
 
 	CPropertyPage::OnInitDialog();
 
@@ -302,6 +303,9 @@
 		SendDlgItemMessage(IDC_CONFIRM_CHANGE_PASTE, WM_SETFONT, (WPARAM)DlgCopypasteFont, MAKELPARAM(TRUE,0));
 		SendDlgItemMessage(IDC_DELIMITER, WM_SETFONT, (WPARAM)DlgCopypasteFont, MAKELPARAM(TRUE,0));
 		SendDlgItemMessage(IDC_DELIM_LIST, WM_SETFONT, (WPARAM)DlgCopypasteFont, MAKELPARAM(TRUE,0));
+		SendDlgItemMessage(IDC_PASTEDELAY_LABEL, WM_SETFONT, (WPARAM)DlgCopypasteFont, MAKELPARAM(TRUE,0));
+		SendDlgItemMessage(IDC_PASTEDELAY_EDIT, WM_SETFONT, (WPARAM)DlgCopypasteFont, MAKELPARAM(TRUE,0));
+		SendDlgItemMessage(IDC_PASTEDELAY_LABEL2, WM_SETFONT, (WPARAM)DlgCopypasteFont, MAKELPARAM(TRUE,0));
 	}
 	else {
 		DlgCopypasteFont = NULL;
@@ -325,6 +329,12 @@
 	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);
+	GetDlgItemText(IDC_PASTEDELAY_LABEL, uimsg, sizeof(uimsg));
+	get_lang_msg("DLG_TAB_COPYPASTE_PASTEDELAY", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
+	SetDlgItemText(IDC_PASTEDELAY_LABEL, ts.UIMsg);
+	GetDlgItemText(IDC_PASTEDELAY_LABEL2, uimsg, sizeof(uimsg));
+	get_lang_msg("DLG_TAB_COPYPASTE_PASTEDELAY2", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
+	SetDlgItemText(IDC_PASTEDELAY_LABEL2, ts.UIMsg);
 
 	// (1)Enable continued-line copy
 	btn = (CButton *)GetDlgItem(IDC_LINECOPY);
@@ -354,6 +364,9 @@
 	// (6)delimiter characters
 	SetDlgItemText(IDC_DELIM_LIST, ts.DelimList);
 
+	// (7)PasteDelayPerLine
+	_snprintf_s(buf, sizeof(buf), "%d", ts.PasteDelayPerLine);
+	SetDlgItemText(IDC_PASTEDELAY_EDIT, buf);
 
 	// ƒ_ƒCƒAƒƒO‚ɃtƒH[ƒJƒX‚ð“–‚Ä‚é
 	::SetFocus(::GetDlgItem(GetSafeHwnd(), IDC_LINECOPY));
@@ -383,6 +396,8 @@
 void CCopypastePropPageDlg::OnOK()
 {
 	CButton *btn;
+	char buf[64];
+	int val;
 
 	// (1)
 	btn = (CButton *)GetDlgItem(IDC_LINECOPY);
@@ -406,6 +421,12 @@
 
 	// (6)
 	GetDlgItemText(IDC_DELIM_LIST, ts.DelimList, sizeof(ts.DelimList));
+
+	// (7)
+	GetDlgItemText(IDC_PASTEDELAY_EDIT, buf, sizeof(buf));
+	val = atoi(buf);
+	if (val > 0) 
+		ts.PasteDelayPerLine = val;
 }
 
 

Modified: trunk/teraterm/teraterm/clipboar.c
===================================================================
--- trunk/teraterm/teraterm/clipboar.c	2009-04-11 10:07:33 UTC (rev 3305)
+++ trunk/teraterm/teraterm/clipboar.c	2009-04-12 12:45:43 UTC (rev 3306)
@@ -140,7 +140,6 @@
 {
   int c;
   BOOL EndFlag;
-  int SendBytes = 0;
 
   if (CBMemHandle==NULL) return;
 
@@ -163,8 +162,11 @@
   if (CBMemPtr==NULL) return;
   
   do {
-    if (CBSendCR && (CBMemPtr[CBMemPtr2]==0x0a))
+    if (CBSendCR && (CBMemPtr[CBMemPtr2]==0x0a)) {
       CBMemPtr2++;
+      // added PasteDelayPerLine (2009.4.12 maya)
+      Sleep(ts.PasteDelayPerLine);
+    }
 
     EndFlag = (CBMemPtr[CBMemPtr2]==0);
     if (! EndFlag)
@@ -206,15 +208,6 @@
 	c = CommTextEcho(&cv,(PCHAR)&CBByte,1);
 	CBRetryEcho = (c==0);
       }
-
-      // SSH2 ‚Å‘å‚«‚¢ƒf[ƒ^‚ð“\‚è•t‚¯‚½‚Æ‚«‚ɃGƒR[ƒoƒbƒN‚ªŒ‡‚¯‚邱‚Æ‚ª
-      // ‚ ‚é‚̂ŁA500 ƒoƒCƒg‘—M‚·‚邲‚Æ‚É 10ms(‚±‚Ì’l‚ɍª‹’‚Í‚È‚¢) ‘Ò‚Â
-      // workaround (2008.8.22 maya)
-      SendBytes++;
-      if (SendBytes > 500) {
-        SendBytes = 0;
-        Sleep(10);
-      }
     }
     else
       c=0;

Modified: trunk/teraterm/teraterm/ttermpro.rc
===================================================================
--- trunk/teraterm/teraterm/ttermpro.rc	2009-04-11 10:07:33 UTC (rev 3305)
+++ trunk/teraterm/teraterm/ttermpro.rc	2009-04-12 12:45:43 UTC (rev 3306)
@@ -248,8 +248,11 @@
                     "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,86,62,8
-    EDITTEXT        IDC_DELIM_LIST,75,84,130,12,ES_AUTOHSCROLL
+    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
 END
 
 

Modified: trunk/teraterm/ttpset/ttset.c
===================================================================
--- trunk/teraterm/ttpset/ttset.c	2009-04-11 10:07:33 UTC (rev 3305)
+++ trunk/teraterm/ttpset/ttset.c	2009-04-12 12:45:43 UTC (rev 3306)
@@ -1262,6 +1262,10 @@
 	// added DisableAcceleratorDuplicateSession (2009.4.6 maya)
 	ts->DisableAcceleratorDuplicateSession =
 		GetOnOff(Section, "DisableAcceleratorDuplicateSession", FName, FALSE);
+
+	// added PasteDelayPerLine (2009.4.12 maya)
+	ts->PasteDelayPerLine =
+		GetPrivateProfileInt(Section, "PasteDelayPerLine", 10, FName);
 }
 
 void FAR PASCAL WriteIniFile(PCHAR FName, PTTSet ts)
@@ -2176,6 +2180,10 @@
 	// DisableAcceleratorDuplicateSession
 	WriteOnOff(Section, "DisableAcceleratorDuplicateSession", FName,
 	           ts->DisableAcceleratorDuplicateSession);
+
+	// added PasteDelayPerLine (2009.4.12 maya)
+	WriteInt(Section, "PasteDelayPerLine", FName,
+	         ts->PasteDelayPerLine);
 }
 
 #define VTEditor "VT editor keypad"



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