• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision7142 (tree)
Time2018-06-30 00:29:01
Authorzmatsuo

Log Message

trunkのr7140までマージ

Change Summary

Incremental Difference

--- branches/drag_and_drop/doc/ja/html/menu/setup-additional.html (revision 7141)
+++ branches/drag_and_drop/doc/ja/html/menu/setup-additional.html (revision 7142)
@@ -55,6 +55,28 @@
5555 Windows 7以降には各フォントをフォント一覧に表示するか非表示にするかを設定する機能が追加されました。Tera Term のこの設定を有効にすると、OS側で非表示に設定されたフォントも<a href="setup-font.html">フォント設定ダイアログ</a>で選択できるようになります。
5656 </dd>
5757
58+ <dt id="TitleFormat">Title format</dt>
59+ <dd>ウィンドウタイトルの形式を設定します。
60+ <dl>
61+ <dt>Display host/port name</dt>
62+ <dd>ホスト名またはシリアルポート名を表示します</dd>
63+
64+ <dt>Display session number</dt>
65+ <dd>セッション番号を表示します</dd>
66+
67+ <dt>Display VT/TEK</dt>
68+ <dd>VTまたはTEKを表示します</dd>
69+
70+ <dt>Swap hostname and title position</dt>
71+ <dd>ホスト名と<a href="setup-window.html#Title">タイトルテキスト</a>の位置を入れ換え、ホスト名を先に表示します</dd>
72+
73+ <dt>Display tcp port number</dt>
74+ <dd>TCP ポート番号を表示します (TCP/IP 接続時のみ)</dd>
75+
76+ <dt>Display serial port speed</dt>
77+ <dd>シリアルポートのスピードを表示します (シリアル接続時のみ)</dd>
78+ </dl>
79+ </dd>
5880 </dl>
5981
6082
--- branches/drag_and_drop/doc/ja/html/usage/mouse.html (revision 7141)
+++ branches/drag_and_drop/doc/ja/html/usage/mouse.html (revision 7142)
@@ -40,8 +40,16 @@
4040 <a href="../menu/setup-additional.html">DisableMouseRButtonPaste</a> が無効のときに動作する。</dd>
4141
4242 <dt>タイトルバーの上で左ボタンをダブルクリック</dt>
43-<dd>ウインドウサイズ(ウインドウの実際の大きさ)がターミナルサイズ(端末の論理的な画面の大きさ)と異なるとき、ウィンドウサイズをターミナルサイズと同じになるように変更します。その後、もう一度タイトルバーをダブルクリックすると、もとのウインドウサイズに戻ります。</dd>
43+<dd><a href="../menu/setup-terminal.html#TermIsWin">Term size = win size</a>の設定によって動作が変わります。
44+ <dl>
45+ <dt>onの時</dt>
46+ <dd>ウィンドウのサイズを最大化します。既に最大化されている場合は、もとのサイズに戻します。</dd>
4447
48+ <dt>offの時</dt>
49+ <dd>ウインドウサイズ(ウインドウの実際の大きさ)がターミナルサイズ(端末の論理的な画面の大きさ)と異なるとき、ウィンドウサイズをターミナルサイズと同じになるように変更します。その後、もう一度タイトルバーをダブルクリックすると、もとのウインドウサイズに戻ります。</dd>
50+ </dl>
51+</dd>
52+
4553 <dt>Ctrl キーを押しながら左ボタンをクリック</dt>
4654 <dd>メニューバーがなければ、ポップアップメニューが現れます。メニューバーを隠すには、<A HREF="../menu/setup-window.html">[Setup] Window</A> で Hide menu bar を選択してください。</dd>
4755
--- branches/drag_and_drop/doc/ja/html/about/history.html (revision 7141)
+++ branches/drag_and_drop/doc/ja/html/about/history.html (revision 7142)
@@ -31,8 +31,15 @@
3131
3232 <h2><a name="teraterm">Tera Term</a></h2>
3333
34-<h3><a name="teraterm_4.99">2018.05.31 (Ver 4.99)</a></h3>
34+<h3><a name="teraterm_4.100">2018.08.xx (Ver 4.100)</a></h3>
3535 <ul class="history">
36+ <li>変更
37+ <ul>
38+ <li><a href="../menu/setup-additional.html#TitleFormat">Additional settingsダイアログ</a>の General タブに<a href="../setup/teraterm-win.html#title">タイトル形式の設定</a>を追加した。</li>
39+ <li><a href="../menu/setup-terminal.html#TermIsWin">Term size = win size</a> 設定が on の場合は、タイトルバーをダブルクリックした時にウィンドウサイズを最大化するように変更した。</a>
40+ </ul>
41+ </li>
42+
3643 <li>その他
3744 <ul>
3845 <li><a href="#ttssh_2.86">TTSSH(2.86)</a>へ差し替えた。</li>
--- branches/drag_and_drop/doc/en/html/about/history.html (revision 7141)
+++ branches/drag_and_drop/doc/en/html/about/history.html (revision 7142)
@@ -33,6 +33,13 @@
3333
3434 <h3><a name="teraterm_4.100">2018.08.xx (Ver 4.100)</a></h3>
3535 <ul class="history">
36+ <li>Changes
37+ <ul>
38+ <li>added the <a href="../setup/teraterm-win.html#title">Title format configuration</a> on the General tab of the <a href="../menu/setup-additional.html#TitleFormat">Additional settings dialog</a>.</li>
39+ <li>Window size is maximized when the titlie bar is double-clicked if <a href="../menu/setup-terminal.html#TermIsWin">"Term size = win size"</a> setting is on.</li>
40+ </ul>
41+ </li>
42+
3643 <li>Misc
3744 <ul>
3845 <li>upgraded TTSSH to <a href="#ttssh_2.86">2.86</a>.</li>
--- branches/drag_and_drop/doc/en/html/menu/setup-additional.html (revision 7141)
+++ branches/drag_and_drop/doc/en/html/menu/setup-additional.html (revision 7142)
@@ -56,6 +56,28 @@
5656 When this setting is enabled, whole fonts can be selected on the <a href="setup-font.html">Font setting dialog</a>.
5757 </dd>
5858
59+ <dt id="TitleFormat">Title format</dt>
60+ <dd>Configures the window title format.
61+ <dl>
62+ <dt>Display host/port name</dt>
63+ <dd>Displays hostname or serial port name</dd>
64+
65+ <dt>Display session number</dt>
66+ <dd>Displays session number</dt>
67+
68+ <dt>Display VT/TEK</dt>
69+ <dd>Displays VT or TEK</dt>
70+
71+ <dt>Swap hostname and title position</dt>
72+ <dd>Swaps the hostname and <a href="setup-window.html#Title">title text</a>, displays hostname first.</dd>
73+
74+ <dt>Display tcp port number</dt>
75+ <dd>Displays tcp port number (TCP/IP connection only)</dd>
76+
77+ <dt>Display serial port speed</dt>
78+ <dd>Displays speed of serial port (serial connection only)</dd>
79+ </dl>
80+ </dd>
5981 </dl>
6082
6183
--- branches/drag_and_drop/doc/en/html/usage/mouse.html (revision 7141)
+++ branches/drag_and_drop/doc/en/html/usage/mouse.html (revision 7142)
@@ -40,8 +40,16 @@
4040 It is effective when <a href="../menu/setup-additional.html">DisableMouseRButtonPaste</a> is disabled.</dd>
4141
4242 <dt>Double clicking the left button on the title bar</dt>
43-<dd>If the window size (real screen size) is not equal to the terminal size (logical size of the terminal), resizes the window to the terminal size. A further double clicking restores the original window size.</dd>
43+<dd>
44+ <dl>The behaviour is changed according to the <a href="../menu/setup-terminal.html#TermIsWin">"Term size = win size"</a> setting.
45+ <dt>On</dt>
46+ <dd>Maximize window. If the window is already maximized, restore to the original size.</dd>
4447
48+ <dt>Off</dt>
49+ <dd>If the window size (real screen size) is not equal to the terminal size (logical size of the terminal), resizes the window to the terminal size. A further double clicking restores the original window size.</dd>
50+ </dl>
51+</dd>
52+
4553 <dt>Clicking the left button while pressing the Ctrl key</dt>
4654 <dd>If the menu bar is hidden, the pop-up menu appears. To hide the menu bar, check the Hide menu bar option in the [Setup] Window dialog box.</dd>
4755
--- branches/drag_and_drop/ttssh2/ttxssh/crypt.c (revision 7141)
+++ branches/drag_and_drop/ttssh2/ttxssh/crypt.c (revision 7142)
@@ -72,6 +72,8 @@
7272
7373 #define CMP(a,b) memcmp(a, b, SSH_BLOCKSIZE)
7474
75+static unsigned char *encbuff = NULL;
76+static unsigned int encbufflen = 0;
7577
7678 static char *get_cipher_name(int cipher);
7779
@@ -200,7 +202,7 @@
200202
201203 BOOL CRYPT_encrypt_aead(PTInstVar pvar, unsigned char *data, unsigned int bytes, unsigned int aadlen, unsigned int authlen)
202204 {
203- unsigned char *newbuf = NULL;
205+ unsigned char *newbuff = NULL;
204206 unsigned int block_size = pvar->ssh2_keys[MODE_OUT].enc.block_size;
205207 unsigned char lastiv[1];
206208 char tmp[80];
@@ -218,8 +220,12 @@
218220 return FALSE;
219221 }
220222
221- if ((newbuf = malloc(bytes)) == NULL)
222- goto err;
223+ if (bytes > encbufflen) {
224+ if ((newbuff = realloc(encbuff, bytes)) == NULL)
225+ goto err;
226+ encbuff = newbuff;
227+ encbufflen = bytes;
228+ }
223229
224230 if (!EVP_CIPHER_CTX_ctrl(evp, EVP_CTRL_GCM_IV_GEN, 1, lastiv))
225231 goto err;
@@ -227,10 +233,10 @@
227233 if (aadlen && !EVP_Cipher(evp, NULL, data, aadlen) < 0)
228234 goto err;
229235
230- if (EVP_Cipher(evp, newbuf, data+aadlen, bytes) < 0)
236+ if (EVP_Cipher(evp, encbuff, data+aadlen, bytes) < 0)
231237 goto err;
232238
233- memcpy(data+aadlen, newbuf, bytes);
239+ memcpy(data+aadlen, encbuff, bytes);
234240
235241 if (EVP_Cipher(evp, NULL, NULL, 0) < 0)
236242 goto err;
@@ -238,13 +244,9 @@
238244 if (!EVP_CIPHER_CTX_ctrl(evp, EVP_CTRL_GCM_GET_TAG, authlen, data+aadlen+bytes))
239245 goto err;
240246
241- free(newbuf);
242-
243247 return TRUE;
244248
245249 err:
246- free(newbuf);
247-
248250 UTIL_get_lang_msg("MSG_ENCRYPT_ERROR2", pvar, "%s encrypt error(2)");
249251 _snprintf_s(tmp, sizeof(tmp), _TRUNCATE, pvar->ts->UIMsg,
250252 get_cipher_name(pvar->crypt_state.sender_cipher));
@@ -254,7 +256,7 @@
254256
255257 BOOL CRYPT_decrypt_aead(PTInstVar pvar, unsigned char *data, unsigned int bytes, unsigned int aadlen, unsigned int authlen)
256258 {
257- unsigned char *newbuf = NULL;
259+ unsigned char *newbuff = NULL;
258260 unsigned int block_size = pvar->ssh2_keys[MODE_IN].enc.block_size;
259261 unsigned char lastiv[1];
260262 char tmp[80];
@@ -272,8 +274,12 @@
272274 return FALSE;
273275 }
274276
275- if ((newbuf = malloc(bytes)) == NULL)
276- goto err;
277+ if (bytes > encbufflen) {
278+ if ((newbuff = realloc(encbuff, bytes)) == NULL)
279+ goto err;
280+ encbuff = newbuff;
281+ encbufflen = bytes;
282+ }
277283
278284 if (!EVP_CIPHER_CTX_ctrl(evp, EVP_CTRL_GCM_IV_GEN, 1, lastiv))
279285 goto err;
@@ -284,11 +290,10 @@
284290 if (aadlen && !EVP_Cipher(evp, NULL, data, aadlen) < 0)
285291 goto err;
286292
287- if (EVP_Cipher(evp, newbuf, data+aadlen, bytes) < 0)
293+ if (EVP_Cipher(evp, encbuff, data+aadlen, bytes) < 0)
288294 goto err;
289295
290- memcpy(data+aadlen, newbuf, bytes);
291- free(newbuf);
296+ memcpy(data+aadlen, encbuff, bytes);
292297
293298 if (EVP_Cipher(evp, NULL, NULL, 0) < 0)
294299 return FALSE;
@@ -296,8 +301,6 @@
296301 return TRUE;
297302
298303 err:
299- free(newbuf);
300-
301304 UTIL_get_lang_msg("MSG_DECRYPT_ERROR2", pvar, "%s decrypt error(2)");
302305 _snprintf_s(tmp, sizeof(tmp), _TRUNCATE, pvar->ts->UIMsg,
303306 get_cipher_name(pvar->crypt_state.receiver_cipher));
@@ -311,7 +314,7 @@
311314
312315 static void crypt_SSH2_encrypt(PTInstVar pvar, unsigned char *buf, int bytes)
313316 {
314- unsigned char *newbuf;
317+ unsigned char *newbuff;
315318 int block_size = pvar->ssh2_keys[MODE_OUT].enc.block_size;
316319 char tmp[80];
317320
@@ -328,24 +331,26 @@
328331 return;
329332 }
330333
331- if ((newbuf = malloc(bytes)) == NULL)
332- return;
334+ if (bytes > encbufflen) {
335+ if ((newbuff = realloc(encbuff, bytes)) == NULL)
336+ return;
337+ encbuff = newbuff;
338+ encbufflen = bytes;
339+ }
333340
334- if (EVP_Cipher(&pvar->evpcip[MODE_OUT], newbuf, buf, bytes) == 0) {
341+ if (EVP_Cipher(&pvar->evpcip[MODE_OUT], encbuff, buf, bytes) == 0) {
335342 UTIL_get_lang_msg("MSG_ENCRYPT_ERROR2", pvar, "%s encrypt error(2)");
336343 _snprintf_s(tmp, sizeof(tmp), _TRUNCATE, pvar->ts->UIMsg,
337344 get_cipher_name(pvar->crypt_state.sender_cipher));
338345 notify_fatal_error(pvar, tmp, TRUE);
339346 } else {
340- memcpy(buf, newbuf, bytes);
347+ memcpy(buf, encbuff, bytes);
341348 }
342-
343- free(newbuf);
344349 }
345350
346351 static void crypt_SSH2_decrypt(PTInstVar pvar, unsigned char *buf, int bytes)
347352 {
348- unsigned char *newbuf;
353+ unsigned char *newbuff;
349354 int block_size = pvar->ssh2_keys[MODE_IN].enc.block_size;
350355 char tmp[80];
351356
@@ -362,19 +367,21 @@
362367 return;
363368 }
364369
365- if ((newbuf = malloc(bytes)) == NULL)
366- return;
370+ if (bytes > encbufflen) {
371+ if ((newbuff = malloc(bytes)) == NULL)
372+ return;
373+ encbuff = newbuff;
374+ encbufflen = bytes;
375+ }
367376
368- if (EVP_Cipher(&pvar->evpcip[MODE_IN], newbuf, buf, bytes) == 0) {
377+ if (EVP_Cipher(&pvar->evpcip[MODE_IN], encbuff, buf, bytes) == 0) {
369378 UTIL_get_lang_msg("MSG_DECRYPT_ERROR2", pvar, "%s decrypt error(2)");
370379 _snprintf_s(tmp, sizeof(tmp), _TRUNCATE, pvar->ts->UIMsg,
371380 get_cipher_name(pvar->crypt_state.receiver_cipher));
372381 notify_fatal_error(pvar, tmp, TRUE);
373382 } else {
374- memcpy(buf, newbuf, bytes);
383+ memcpy(buf, encbuff, bytes);
375384 }
376-
377- free(newbuf);
378385 }
379386
380387 static void c3DES_encrypt(PTInstVar pvar, unsigned char *buf, int bytes)
@@ -1307,6 +1314,10 @@
13071314
13081315 void CRYPT_end(PTInstVar pvar)
13091316 {
1317+ free(encbuff);
1318+ encbuff = NULL;
1319+ encbufflen = 0;
1320+
13101321 destroy_public_key(&pvar->crypt_state.host_key);
13111322 destroy_public_key(&pvar->crypt_state.server_key);
13121323
--- branches/drag_and_drop/teraterm/teraterm/vtterm.c (revision 7141)
+++ branches/drag_and_drop/teraterm/teraterm/vtterm.c (revision 7142)
@@ -98,8 +98,13 @@
9898 static BOOL AltScr;
9999 static BOOL LRMarginMode;
100100 static BOOL RectangleMode;
101-BOOL BracketedPaste;
101+static BOOL BracketedPaste;
102102
103+char BracketStart[] = "\033[200~";
104+char BracketEnd[] = "\033[201~";
105+int BracketStartLen = (sizeof(BracketStart)-1);
106+int BracketEndLen = (sizeof(BracketEnd)-1);
107+
103108 static int VTlevel;
104109
105110 BOOL AcceptWheelToCursor;
@@ -6104,3 +6109,33 @@
61046109 Send8BitMode = ts.Send8BitCtrl;
61056110 }
61066111 }
6112+
6113+void TermPasteString(char *str, int len)
6114+{
6115+ TermSendStartBracket();
6116+ CommTextOut(&cv, str, len);
6117+ if (ts.LocalEcho) {
6118+ CommTextEcho(&cv, str, len);
6119+ }
6120+ TermSendEndBracket();
6121+
6122+ return;
6123+}
6124+
6125+void TermSendStartBracket()
6126+{
6127+ if (BracketedPaste) {
6128+ CommBinaryOut(&cv, BracketStart, BracketStartLen);
6129+ }
6130+
6131+ return;
6132+}
6133+
6134+void TermSendEndBracket()
6135+{
6136+ if (BracketedPaste) {
6137+ CommBinaryOut(&cv, BracketEnd, BracketEndLen);
6138+ }
6139+
6140+ return;
6141+}
--- branches/drag_and_drop/teraterm/teraterm/vtterm.h (revision 7141)
+++ branches/drag_and_drop/teraterm/teraterm/vtterm.h (revision 7142)
@@ -46,7 +46,15 @@
4646 BOOL WheelToCursorMode();
4747 void EndTerm();
4848 void ChangeTerminalID();
49+void TermPasteString(char *str, int len);
50+void TermSendStartBracket(void);
51+void TermSendEndBracket(void);
4952
5053 #ifdef __cplusplus
5154 }
5255 #endif
56+
57+extern int BracketStartLen;
58+extern int BracketEndLen;
59+extern char BracketStart[];
60+extern char BracketEnd[];
--- branches/drag_and_drop/teraterm/teraterm/clipboar.c (revision 7141)
+++ branches/drag_and_drop/teraterm/teraterm/clipboar.c (revision 7142)
@@ -31,6 +31,7 @@
3131 #include "teraterm.h"
3232 #include "tttypes.h"
3333 #include "vtdisp.h"
34+#include "vtterm.h"
3435 #include <string.h>
3536 #include <stdlib.h>
3637 #include <stdio.h>
@@ -372,12 +373,8 @@
372373 }
373374 }
374375
375-#define BracketStartLen (sizeof(BracketStart)-1)
376-#define BracketEndLen (sizeof(BracketEnd)-1)
377376 void CBStartPaste(HWND HWin, BOOL AddCR, BOOL Bracketed)
378377 {
379- static char BracketStart[] = "\033[200~";
380- static char BracketEnd[] = "\033[201~";
381378 UINT Cf;
382379 PCHAR TmpPtr;
383380 LPWSTR TmpPtrW;
--- branches/drag_and_drop/teraterm/teraterm/vtwin.cpp (revision 7141)
+++ branches/drag_and_drop/teraterm/teraterm/vtwin.cpp (revision 7142)
@@ -2899,7 +2899,7 @@
28992899
29002900 void CVTWindow::OnNcLButtonDblClk(UINT nHitTest, CPoint point)
29012901 {
2902- if (! Minimized && (nHitTest == HTCAPTION)) {
2902+ if (! Minimized && !ts.TermIsWin && (nHitTest == HTCAPTION)) {
29032903 DispRestoreWinSize();
29042904 }
29052905 else {
--- branches/drag_and_drop/teraterm/teraterm/addsetting.cpp (revision 7141)
+++ branches/drag_and_drop/teraterm/teraterm/addsetting.cpp (revision 7142)
@@ -120,6 +120,13 @@
120120 SendDlgItemMessage(IDC_CLEAR_ON_RESIZE, WM_SETFONT, (WPARAM)DlgGeneralFont, MAKELPARAM(TRUE,0));
121121 SendDlgItemMessage(IDC_CURSOR_CHANGE_IME, WM_SETFONT, (WPARAM)DlgGeneralFont, MAKELPARAM(TRUE,0));
122122 SendDlgItemMessage(IDC_LIST_HIDDEN_FONTS, WM_SETFONT, (WPARAM)DlgGeneralFont, MAKELPARAM(TRUE,0));
123+ SendDlgItemMessage(IDC_TITLEFMT_GROUP, WM_SETFONT, (WPARAM)DlgGeneralFont, MAKELPARAM(TRUE,0));
124+ SendDlgItemMessage(IDC_TITLEFMT_DISPHOSTNAME, WM_SETFONT, (WPARAM)DlgGeneralFont, MAKELPARAM(TRUE,0));
125+ SendDlgItemMessage(IDC_TITLEFMT_DISPSESSION, WM_SETFONT, (WPARAM)DlgGeneralFont, MAKELPARAM(TRUE,0));
126+ SendDlgItemMessage(IDC_TITLEFMT_DISPVTTEK, WM_SETFONT, (WPARAM)DlgGeneralFont, MAKELPARAM(TRUE,0));
127+ SendDlgItemMessage(IDC_TITLEFMT_SWAPHOSTTITLE, WM_SETFONT, (WPARAM)DlgGeneralFont, MAKELPARAM(TRUE,0));
128+ SendDlgItemMessage(IDC_TITLEFMT_DISPTCPPORT, WM_SETFONT, (WPARAM)DlgGeneralFont, MAKELPARAM(TRUE,0));
129+ SendDlgItemMessage(IDC_TITLEFMT_DISPSERIALSPEED, WM_SETFONT, (WPARAM)DlgGeneralFont, MAKELPARAM(TRUE,0));
123130 }
124131 else {
125132 DlgGeneralFont = NULL;
@@ -150,6 +157,28 @@
150157 get_lang_msg("DLG_TAB_GENERAL_LIST_HIDDEN_FONTS", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
151158 SetDlgItemText(IDC_LIST_HIDDEN_FONTS, ts.UIMsg);
152159
160+ GetDlgItemText(IDC_TITLEFMT_GROUP, uimsg, sizeof(uimsg));
161+ get_lang_msg("DLG_TAB_GENERAL_TITLEFMT_GROUP", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
162+ SetDlgItemText(IDC_TITLEFMT_GROUP, ts.UIMsg);
163+ GetDlgItemText(IDC_TITLEFMT_DISPHOSTNAME, uimsg, sizeof(uimsg));
164+ get_lang_msg("DLG_TAB_GENERAL_TITLEFMT_DISPHOSTNAME", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
165+ SetDlgItemText(IDC_TITLEFMT_DISPHOSTNAME, ts.UIMsg);
166+ GetDlgItemText(IDC_TITLEFMT_DISPSESSION, uimsg, sizeof(uimsg));
167+ get_lang_msg("DLG_TAB_GENERAL_TITLEFMT_DISPSESSION", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
168+ SetDlgItemText(IDC_TITLEFMT_DISPSESSION, ts.UIMsg);
169+ GetDlgItemText(IDC_TITLEFMT_DISPVTTEK, uimsg, sizeof(uimsg));
170+ get_lang_msg("DLG_TAB_GENERAL_TITLEFMT_DISPVTTEK", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
171+ SetDlgItemText(IDC_TITLEFMT_DISPVTTEK, ts.UIMsg);
172+ GetDlgItemText(IDC_TITLEFMT_SWAPHOSTTITLE, uimsg, sizeof(uimsg));
173+ get_lang_msg("DLG_TAB_GENERAL_TITLEFMT_SWAPHOSTTITLE", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
174+ SetDlgItemText(IDC_TITLEFMT_SWAPHOSTTITLE, ts.UIMsg);
175+ GetDlgItemText(IDC_TITLEFMT_DISPTCPPORT, uimsg, sizeof(uimsg));
176+ get_lang_msg("DLG_TAB_GENERAL_TITLEFMT_DISPTCPPORT", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
177+ SetDlgItemText(IDC_TITLEFMT_DISPTCPPORT, ts.UIMsg);
178+ GetDlgItemText(IDC_TITLEFMT_DISPSERIALSPEED, uimsg, sizeof(uimsg));
179+ get_lang_msg("DLG_TAB_GENERAL_TITLEFMT_DISPSERIALSPEED", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
180+ SetDlgItemText(IDC_TITLEFMT_DISPSERIALSPEED, ts.UIMsg);
181+
153182 // (1)DisableAcceleratorSendBreak
154183 btn = (CButton *)GetDlgItem(IDC_DISABLE_SENDBREAK);
155184 btn->SetCheck(ts.DisableAcceleratorSendBreak);
@@ -182,6 +211,25 @@
182211 btn = (CButton *)GetDlgItem(IDC_LIST_HIDDEN_FONTS);
183212 btn->SetCheck(ts.ListHiddenFonts);
184213
214+ // (9) Title Format
215+ btn = (CButton *)GetDlgItem(IDC_TITLEFMT_DISPHOSTNAME);
216+ btn->SetCheck((ts.TitleFormat & 1) != 0);
217+
218+ btn = (CButton *)GetDlgItem(IDC_TITLEFMT_DISPSESSION);
219+ btn->SetCheck((ts.TitleFormat & (1<<1)) != 0);
220+
221+ btn = (CButton *)GetDlgItem(IDC_TITLEFMT_DISPVTTEK);
222+ btn->SetCheck((ts.TitleFormat & (1<<2)) != 0);
223+
224+ btn = (CButton *)GetDlgItem(IDC_TITLEFMT_SWAPHOSTTITLE);
225+ btn->SetCheck((ts.TitleFormat & (1<<3)) != 0);
226+
227+ btn = (CButton *)GetDlgItem(IDC_TITLEFMT_DISPTCPPORT);
228+ btn->SetCheck((ts.TitleFormat & (1<<4)) != 0);
229+
230+ btn = (CButton *)GetDlgItem(IDC_TITLEFMT_DISPSERIALSPEED);
231+ btn->SetCheck((ts.TitleFormat & (1<<5)) != 0);
232+
185233 // ダイアログにフォーカスを当てる (2004.12.7 yutaka)
186234 ::SetFocus(::GetDlgItem(GetSafeHwnd(), IDC_CLICKABLE_URL));
187235
@@ -231,6 +279,20 @@
231279 // (8)IDC_LIST_HIDDEN_FONTS
232280 btn = (CButton *)GetDlgItem(IDC_LIST_HIDDEN_FONTS);
233281 ts.ListHiddenFonts = btn->GetCheck();
282+
283+ // (9) Title Format
284+ btn = (CButton *)GetDlgItem(IDC_TITLEFMT_DISPHOSTNAME);
285+ ts.TitleFormat = (btn->GetCheck() == BST_CHECKED);
286+ btn = (CButton *)GetDlgItem(IDC_TITLEFMT_DISPSESSION);
287+ ts.TitleFormat |= ((btn->GetCheck() == BST_CHECKED) << 1);
288+ btn = (CButton *)GetDlgItem(IDC_TITLEFMT_DISPVTTEK);
289+ ts.TitleFormat |= ((btn->GetCheck() == BST_CHECKED) << 2);
290+ btn = (CButton *)GetDlgItem(IDC_TITLEFMT_SWAPHOSTTITLE);
291+ ts.TitleFormat |= ((btn->GetCheck() == BST_CHECKED) << 3);
292+ btn = (CButton *)GetDlgItem(IDC_TITLEFMT_DISPTCPPORT);
293+ ts.TitleFormat |= ((btn->GetCheck() == BST_CHECKED) << 4);
294+ btn = (CButton *)GetDlgItem(IDC_TITLEFMT_DISPSERIALSPEED);
295+ ts.TitleFormat |= ((btn->GetCheck() == BST_CHECKED) << 5);
234296 }
235297
236298
--- branches/drag_and_drop/teraterm/common/tt_res.h (revision 7141)
+++ branches/drag_and_drop/teraterm/common/tt_res.h (revision 7142)
@@ -213,20 +213,27 @@
213213 #define IDC_NORMALIZE_LINEBREAK 2565
214214 #define IDC_CLIPBOARD_NOTIFY 2566
215215 #define IDC_LIST_HIDDEN_FONTS 2567
216-#define IDC_BINARY_CHECK 2568
217-#define IDC_SAME_PROCESS_CHECK 2569
218-#define IDC_FILENAME_EDIT 2570
219-#define IDC_SCP_RADIO 2571
220-#define IDC_SENDFILE_RADIO 2572
221-#define IDC_PASTE_RADIO 2573
222-#define IDC_ESCAPE_CHECK 2574
223-#define IDC_SCP_PATH_LABEL 2575
224-#define IDC_SCP_PATH_NOTE 2576
225-#define IDC_SPACE_RADIO 2577
226-#define IDC_NEWLINE_RADIO 2578
227-#define IDC_DAD_NOTE 2579
228-#define IDC_SAME_PROCESS_NEXTDROP_CHECK 2580
229-#define IDC_DONTSHOW_CHECK 2581
216+#define IDC_TITLEFMT_GROUP 2568
217+#define IDC_TITLEFMT_DISPHOSTNAME 2569
218+#define IDC_TITLEFMT_DISPSESSION 2570
219+#define IDC_TITLEFMT_DISPVTTEK 2571
220+#define IDC_TITLEFMT_SWAPHOSTTITLE 2572
221+#define IDC_TITLEFMT_DISPTCPPORT 2573
222+#define IDC_TITLEFMT_DISPSERIALSPEED 2574
223+#define IDC_FILENAME_EDIT 2575
224+#define IDC_SCP_RADIO 2576
225+#define IDC_SENDFILE_RADIO 2577
226+#define IDC_PASTE_RADIO 2578
227+#define IDC_SCP_PATH_LABEL 2579
228+#define IDC_SCP_PATH_NOTE 2580
229+#define IDC_BINARY_CHECK 2581
230+#define IDC_ESCAPE_CHECK 2582
231+#define IDC_SPACE_RADIO 2583
232+#define IDC_NEWLINE_RADIO 2584
233+#define IDC_SAME_PROCESS_CHECK 2585
234+#define IDC_SAME_PROCESS_NEXTDROP_CHECK 2586
235+#define IDC_DONTSHOW_CHECK 2587
236+#define IDC_DAD_NOTE 2588
230237 #define ID_ACC_SENDBREAK 50001
231238 #define ID_ACC_COPY 50002
232239 #define ID_ACC_NEWCONNECTION 50003
@@ -324,7 +331,7 @@
324331 #define _APS_NO_MFC 1
325332 #define _APS_NEXT_RESOURCE_VALUE 126
326333 #define _APS_NEXT_COMMAND_VALUE 52031
327-#define _APS_NEXT_CONTROL_VALUE 2582
334+#define _APS_NEXT_CONTROL_VALUE 2589
328335 #define _APS_NEXT_SYMED_VALUE 101
329336 #endif
330337 #endif
Show on old repository browser