• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision7131 (tree)
Time2018-06-14 17:43:41
Authordoda

Log Message

UI から TitleFormat を変更可能にした。 #35766

アクセスキーの選び方が微妙。改善案募集中。

Change Summary

Incremental Difference

--- trunk/teraterm/teraterm/addsetting.cpp (revision 7130)
+++ trunk/teraterm/teraterm/addsetting.cpp (revision 7131)
@@ -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
--- trunk/teraterm/common/tt_res.h (revision 7130)
+++ trunk/teraterm/common/tt_res.h (revision 7131)
@@ -218,6 +218,13 @@
218218 #define IDC_NORMALIZE_LINEBREAK 2565
219219 #define IDC_CLIPBOARD_NOTIFY 2566
220220 #define IDC_LIST_HIDDEN_FONTS 2567
221+#define IDC_TITLEFMT_GROUP 2568
222+#define IDC_TITLEFMT_DISPHOSTNAME 2569
223+#define IDC_TITLEFMT_DISPSESSION 2570
224+#define IDC_TITLEFMT_DISPVTTEK 2571
225+#define IDC_TITLEFMT_SWAPHOSTTITLE 2572
226+#define IDC_TITLEFMT_DISPTCPPORT 2573
227+#define IDC_TITLEFMT_DISPSERIALSPEED 2574
221228
222229 #define ID_ACC_SENDBREAK 50001
223230 #define ID_ACC_COPY 50002
@@ -316,7 +323,7 @@
316323 #define _APS_NO_MFC 1
317324 #define _APS_NEXT_RESOURCE_VALUE 126
318325 #define _APS_NEXT_COMMAND_VALUE 52031
319-#define _APS_NEXT_CONTROL_VALUE 2568
326+#define _APS_NEXT_CONTROL_VALUE 2575
320327 #define _APS_NEXT_SYMED_VALUE 101
321328 #endif
322329 #endif
--- trunk/doc/ja/html/about/history.html (revision 7130)
+++ trunk/doc/ja/html/about/history.html (revision 7131)
@@ -31,8 +31,14 @@
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+ </ul>
40+ </li>
41+
3642 <li>その他
3743 <ul>
3844 <li><a href="#ttssh_2.86">TTSSH(2.86)</a>へ差し替えた。</li>
--- trunk/doc/ja/html/menu/setup-additional.html (revision 7130)
+++ trunk/doc/ja/html/menu/setup-additional.html (revision 7131)
@@ -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
--- trunk/doc/en/html/about/history.html (revision 7130)
+++ trunk/doc/en/html/about/history.html (revision 7131)
@@ -33,6 +33,12 @@
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+ </ul>
40+ </li>
41+
3642 <li>Misc
3743 <ul>
3844 <li>upgraded TTSSH to <a href="#ttssh_2.86">2.86</a>.</li>
--- trunk/doc/en/html/menu/setup-additional.html (revision 7130)
+++ trunk/doc/en/html/menu/setup-additional.html (revision 7131)
@@ -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
Show on old repository browser