[Ttssh2-commit] [8110] シリアルポートのフロー制御の選択肢の表示順を変更した

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 9月 11日 (水) 16:12:46 JST


Revision: 8110
          https://osdn.net/projects/ttssh2/scm/svn/commits/8110
Author:   maya
Date:     2019-09-11 16:12:46 +0900 (Wed, 11 Sep 2019)
Log Message:
-----------
シリアルポートのフロー制御の選択肢の表示順を変更した

Modified Paths:
--------------
    trunk/doc/en/html/menu/setup-serialport.html
    trunk/doc/ja/html/menu/setup-serialport.html
    trunk/teraterm/ttpdlg/ttdlg.c

-------------- next part --------------
Modified: trunk/doc/en/html/menu/setup-serialport.html
===================================================================
--- trunk/doc/en/html/menu/setup-serialport.html	2019-09-10 15:31:48 UTC (rev 8109)
+++ trunk/doc/en/html/menu/setup-serialport.html	2019-09-11 07:12:46 UTC (rev 8110)
@@ -29,8 +29,8 @@
 	  Flow control can be configured in the following:<br>
 	     Xon/Xoff  ...  Software flow<br>
 	     RTS/CTS  ... Hardware flow(RTS/CTS)<br>
+	     DSR/DTR  ... Hardware flow(DSR/DTR)<br>
 	     none  ...  No flow control<br>
-	     DSR/DTR  ... Hardware flow(DSR/DTR)<br>
 	</p>
 	<p>
 	  Note: If Data is 7 bit, the XMODEM, ZMODEM, B PLUS and Quick-VAN

Modified: trunk/doc/ja/html/menu/setup-serialport.html
===================================================================
--- trunk/doc/ja/html/menu/setup-serialport.html	2019-09-10 15:31:48 UTC (rev 8109)
+++ trunk/doc/ja/html/menu/setup-serialport.html	2019-09-11 07:12:46 UTC (rev 8110)
@@ -29,8 +29,8 @@
 	  Flow control\x82͈ȉ\xBA\x82\xAA\x90ݒ\xE8\x82ł\xAB\x82܂\xB7\x81B<br>
 	     Xon/Xoff  ...  \x83\\x83t\x83g\x83E\x83F\x83A\x83t\x83\x8D\x81[<br>
 	     RTS/CTS  ...  \x83n\x81[\x83h\x83E\x83F\x83A\x83t\x83\x8D\x81[(RTS/CTS)<br>
+	     DSR/DTR  ...  \x83n\x81[\x83h\x83E\x83F\x83A\x83t\x83\x8D\x81[(DSR/DTR)<br>
 	     none  ...  \x83t\x83\x8D\x81[\x90\xA7\x8C\xE4\x82Ȃ\xB5<br>
-	     DSR/DTR  ...  \x83n\x81[\x83h\x83E\x83F\x83A\x83t\x83\x8D\x81[(DSR/DTR)<br>
 	</p>
 	<p>
 	  \x92\x8D: Data \x82\xF0 7 \x82ɂ\xB7\x82\xE9\x82ƁAXMODEM, ZMODEM, B-PLUS, Quick-VAN

Modified: trunk/teraterm/ttpdlg/ttdlg.c
===================================================================
--- trunk/teraterm/ttpdlg/ttdlg.c	2019-09-10 15:31:48 UTC (rev 8109)
+++ trunk/teraterm/ttpdlg/ttdlg.c	2019-09-11 07:12:46 UTC (rev 8110)
@@ -1101,7 +1101,7 @@
 static PCHAR DataList[] = {"7 bit","8 bit",NULL};
 static PCHAR ParityList[] = {"none", "odd", "even", "mark", "space", NULL};
 static PCHAR StopList[] = {"1 bit", "1.5 bit", "2 bit", NULL};
-static PCHAR FlowList[] = {"Xon/Xoff","RTS/CTS","none", "DSR/DTR", NULL};
+static PCHAR FlowList[] = {"Xon/Xoff", "RTS/CTS", "DSR/DTR", "none", NULL};
 
 static INT_PTR CALLBACK SerialDlg(HWND Dialog, UINT Message, WPARAM wParam, LPARAM lParam)
 {
@@ -1126,6 +1126,7 @@
 	WORD ComPortTable[MAXCOMPORT];
 	static char *ComPortDesc[MAXCOMPORT];
 	int comports;
+	WORD Flow;
 
 	switch (Message) {
 		case WM_INITDIALOG:
@@ -1188,8 +1189,23 @@
 			SetDropDownList(Dialog, IDC_SERIALDATA, DataList, ts->DataBit);
 			SetDropDownList(Dialog, IDC_SERIALPARITY, ParityList, ts->Parity);
 			SetDropDownList(Dialog, IDC_SERIALSTOP, StopList, ts->StopBit);
-			SetDropDownList(Dialog, IDC_SERIALFLOW, FlowList, ts->Flow);
 
+			/* 
+			 * value               display
+			 * 1 IdFlowX           1 Xon/Xoff
+			 * 2 IdFlowHard        2 RTS/CTS
+			 * 3 IdFlowNone        4 none
+			 * 4 IdFlowHardDsrDtr  3 DSR/DTR
+			 */
+			Flow = ts->Flow;
+			if (Flow == 3) {
+				Flow = 4;
+			}
+			else if (Flow == 4) {
+				Flow = 3;
+			}
+			SetDropDownList(Dialog, IDC_SERIALFLOW, FlowList, Flow);
+
 			SetDlgItemInt(Dialog,IDC_SERIALDELAYCHAR,ts->DelayPerChar,FALSE);
 			SendDlgItemMessage(Dialog, IDC_SERIALDELAYCHAR, EM_LIMITTEXT,4, 0);
 
@@ -1225,7 +1241,21 @@
 							ts->StopBit = w;
 						}
 						if ((w = (WORD)GetCurSel(Dialog, IDC_SERIALFLOW)) > 0) {
-							ts->Flow = w;
+							/*
+							 * display    value
+							 * 1 Xon/Xoff 1 IdFlowX
+							 * 2 RTS/CTS  2 IdFlowHard
+							 * 3 DSR/DTR  4 IdFlowHardDsrDtr
+							 * 4 none     3 IdFlowNone
+							 */
+							Flow = w;
+							if (Flow == 3) {
+								Flow = 4;
+							}
+							else if (Flow == 4) {
+								Flow = 3;
+							}
+							ts->Flow = Flow;
 						}
 
 						ts->DelayPerChar = GetDlgItemInt(Dialog,IDC_SERIALDELAYCHAR,NULL,FALSE);


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