Revision: 10373 https://osdn.net/projects/ttssh2/scm/svn/commits/10373 Author: zmatsuo Date: 2022-11-20 23:18:21 +0900 (Sun, 20 Nov 2022) Log Message: ----------- 通知サウンド設定追加 - 通知サウンドenable/disable追加 - 通知テストボタン追加 Modified Paths: -------------- trunk/doc/en/html/menu/setup-additional.html trunk/doc/en/html/setup/teraterm-ini.html trunk/doc/ja/html/menu/setup-additional.html trunk/doc/ja/html/setup/teraterm-ini.html trunk/installer/release/lang_utf8/English.lng trunk/installer/release/lang_utf8/French.lng trunk/installer/release/lang_utf8/German.lng trunk/installer/release/lang_utf8/Japanese.lng trunk/installer/release/lang_utf8/Korean.lng trunk/installer/release/lang_utf8/Russian.lng trunk/installer/release/lang_utf8/Simplified Chinese.lng trunk/installer/release/lang_utf8/Spanish.lng trunk/installer/release/lang_utf8/Traditional Chinese.lng trunk/teraterm/common/tt_res.h trunk/teraterm/common/tttypes.h trunk/teraterm/teraterm/addsetting.cpp trunk/teraterm/teraterm/addsetting.h trunk/teraterm/teraterm/ttermpro.rc trunk/teraterm/teraterm/vtwin.cpp trunk/teraterm/ttpcmn/ttcmn_notify.cpp trunk/teraterm/ttpcmn/ttcmn_notify.h trunk/teraterm/ttpset/ttset.c -------------- next part -------------- Modified: trunk/doc/en/html/menu/setup-additional.html =================================================================== --- trunk/doc/en/html/menu/setup-additional.html 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/doc/en/html/menu/setup-additional.html 2022-11-20 14:18:21 UTC (rev 10373) @@ -91,7 +91,20 @@ </dd> </dl> + <h3>Notification</h3> + Notification area(it was called the Task Tray before Windows XP) settings. + + Now (r10371), only ttxssh.dll uses notification. + + <dl> + <dt id="NotifySound">Notify sound</dt> + <dd>Notification sound(sound can be muted in Windows XP and later)</dd> + + <dt>Test button</dt> + <dd>Test Notification</dd> + </dl> + <h2 id="TabControlSequence">"Control Sequence" Tab</h2> <dl> <dt id="MouseEventTracking">Accept mouse event tracking</dt> Modified: trunk/doc/en/html/setup/teraterm-ini.html =================================================================== --- trunk/doc/en/html/setup/teraterm-ini.html 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/doc/en/html/setup/teraterm-ini.html 2022-11-20 14:18:21 UTC (rev 10373) @@ -944,6 +944,12 @@ <td></td> </tr> <tr> + <td id="NotifySound"><a href="../menu/setup-additional.html#NotifySound">NotifySound</a></td> + <td style="width:250px;">on</td> + <td style="width:250px;"><-</td> + <td></td> + </tr> + <tr> <td id="Parity"><a href="../menu/setup-serialport.html#Speed">Parity</a></td> <td style="width:250px;">none</td> <td style="width:250px;"><-</td> Modified: trunk/doc/ja/html/menu/setup-additional.html =================================================================== --- trunk/doc/ja/html/menu/setup-additional.html 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/doc/ja/html/menu/setup-additional.html 2022-11-20 14:18:21 UTC (rev 10373) @@ -90,7 +90,20 @@ </dd> </dl> + <h3>Notification</h3> + \x92ʒm\x97̈\xE6(Windows XP\x88ȑO\x82̓^\x83X\x83N\x83g\x83\x8C\x83C\x82ƌĂ\xEA\x82Ă\xA2\x82܂\xB5\x82\xBD)\x82̐ݒ\xE8\x81B + + \x8C\xBB\x8E\x9E\x93_\x82\xC5(r10371)\x82Œʒm\x82𗘗p\x82\xB5\x82Ă\xA2\x82\xE9\x82̂\xCDttxssh.dll\x82݂̂ł\xB7\x81B + + <dl> + <dt id="NotifySound">Notify sound</dt> + <dd>\x92ʒm\x89\xB9\x82\xF0\x8B\x96\x89\xB7\x82\xE9(Windows XP\x88ȍ~\x82͉\xB9\x82\xF0\x8F\xC1\x82\xB7\x82\xB1\x82Ƃ\xAA\x82ł\xAB\x82܂\xB7)</dd> + + <dt>Test button</dt> + <dd>\x92ʒm\x82̃e\x83X\x83g\x82\xF0\x8Ds\x82\xA4</dd> + </dl> + <h2 id="TabControlSequence">"Control Sequence" \x83^\x83u</h2> <dl> <dt id="MouseEventTracking">Accept mouse event tracking</dt> Modified: trunk/doc/ja/html/setup/teraterm-ini.html =================================================================== --- trunk/doc/ja/html/setup/teraterm-ini.html 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/doc/ja/html/setup/teraterm-ini.html 2022-11-20 14:18:21 UTC (rev 10373) @@ -950,6 +950,12 @@ <td></td> </tr> <tr> + <td id="NotifySound"><a href="../menu/setup-additional.html#NotifySound">NotifySound</a></td> + <td style="width:250px;">on</td> + <td style="width:250px;"><-</td> + <td></td> + </tr> + <tr> <td id="Parity"><a href="../menu/setup-serialport.html#Speed">Parity</a></td> <td style="width:250px;">none</td> <td style="width:250px;"><-</td> Modified: trunk/installer/release/lang_utf8/English.lng =================================================================== --- trunk/installer/release/lang_utf8/English.lng 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/installer/release/lang_utf8/English.lng 2022-11-20 14:18:21 UTC (rev 10373) @@ -192,6 +192,9 @@ DLG_TAB_GENERAL_TITLEFMT_SWAPHOSTTITLE=Swap hostname and &title position DLG_TAB_GENERAL_TITLEFMT_DISPTCPPORT=Display tcp &port number DLG_TAB_GENERAL_TITLEFMT_DISPSERIALSPEED=Display se&rial port speed +DLG_TAB_GENERAL_NOTIFICATION_TITLE=Notification +DLG_TAB_GENERAL_NOTIFIY_SOUND=&Notify sound +DLG_TAB_GENERAL_NOTIFICATION_TEST=&Test DLG_TAB_SEQUENCE_ACCEPT_MOUSE_EVENT_TRACKING=Accept &mouse event tracking request DLG_TAB_SEQUENCE_DISABLE_MOUSE_TRACKING_CTRL=&Disable mouse event tracking when Control is pressed Modified: trunk/installer/release/lang_utf8/French.lng =================================================================== --- trunk/installer/release/lang_utf8/French.lng 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/installer/release/lang_utf8/French.lng 2022-11-20 14:18:21 UTC (rev 10373) @@ -193,6 +193,9 @@ DLG_TAB_GENERAL_TITLEFMT_SWAPHOSTTITLE=Swap hostname and &title position DLG_TAB_GENERAL_TITLEFMT_DISPTCPPORT=Display tcp &port number DLG_TAB_GENERAL_TITLEFMT_DISPSERIALSPEED=Display se&rial port speed +DLG_TAB_GENERAL_NOTIFICATION_TITLE=Notification +DLG_TAB_GENERAL_NOTIFIY_SOUND=&Notify sound +DLG_TAB_GENERAL_NOTIFICATION_TEST=&Test DLG_TAB_SEQUENCE_ACCEPT_MOUSE_EVENT_TRACKING=Accepter les événement souris DLG_TAB_SEQUENCE_DISABLE_MOUSE_TRACKING_CTRL=Accepter les événement souris quand CTRL est appuyé Modified: trunk/installer/release/lang_utf8/German.lng =================================================================== --- trunk/installer/release/lang_utf8/German.lng 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/installer/release/lang_utf8/German.lng 2022-11-20 14:18:21 UTC (rev 10373) @@ -193,6 +193,9 @@ DLG_TAB_GENERAL_TITLEFMT_SWAPHOSTTITLE=Swap hostname and &title position DLG_TAB_GENERAL_TITLEFMT_DISPTCPPORT=Display tcp &port number DLG_TAB_GENERAL_TITLEFMT_DISPSERIALSPEED=Display se&rial port speed +DLG_TAB_GENERAL_NOTIFICATION_TITLE=Notification +DLG_TAB_GENERAL_NOTIFIY_SOUND=&Notify sound +DLG_TAB_GENERAL_NOTIFICATION_TEST=&Test DLG_TAB_SEQUENCE_ACCEPT_MOUSE_EVENT_TRACKING=Accept &mouse event tracking request DLG_TAB_SEQUENCE_DISABLE_MOUSE_TRACKING_CTRL=&Disable mouse event tracking when Control is pressed Modified: trunk/installer/release/lang_utf8/Japanese.lng =================================================================== --- trunk/installer/release/lang_utf8/Japanese.lng 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/installer/release/lang_utf8/Japanese.lng 2022-11-20 14:18:21 UTC (rev 10373) @@ -192,6 +192,9 @@ DLG_TAB_GENERAL_TITLEFMT_SWAPHOSTTITLE=タイトルとホスト名の場所を入れ換える(&T) DLG_TAB_GENERAL_TITLEFMT_DISPTCPPORT=TCP ポート番号を表示する(&P) DLG_TAB_GENERAL_TITLEFMT_DISPSERIALSPEED=シリアルポートのスピードを表示する(&R) +DLG_TAB_GENERAL_NOTIFICATION_TITLE=通知 +DLG_TAB_GENERAL_NOTIFIY_SOUND=通知音 +DLG_TAB_GENERAL_NOTIFICATION_TEST=テスト DLG_TAB_SEQUENCE_ACCEPT_MOUSE_EVENT_TRACKING=マウスイベント通知要求を受け入れる(&M) DLG_TAB_SEQUENCE_DISABLE_MOUSE_TRACKING_CTRL=Controlキーを押している間はマウスイベントを通知しない(&D) Modified: trunk/installer/release/lang_utf8/Korean.lng =================================================================== --- trunk/installer/release/lang_utf8/Korean.lng 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/installer/release/lang_utf8/Korean.lng 2022-11-20 14:18:21 UTC (rev 10373) @@ -193,6 +193,9 @@ DLG_TAB_GENERAL_TITLEFMT_SWAPHOSTTITLE=Swap hostname and &title position DLG_TAB_GENERAL_TITLEFMT_DISPTCPPORT=Display tcp &port number DLG_TAB_GENERAL_TITLEFMT_DISPSERIALSPEED=Display se&rial port speed +DLG_TAB_GENERAL_NOTIFICATION_TITLE=Notification +DLG_TAB_GENERAL_NOTIFIY_SOUND=&Notify sound +DLG_TAB_GENERAL_NOTIFICATION_TEST=&Test DLG_TAB_SEQUENCE_ACCEPT_MOUSE_EVENT_TRACKING=마우스 이벤트 추척 요청을 받습니다(&M) DLG_TAB_SEQUENCE_DISABLE_MOUSE_TRACKING_CTRL=컨트롤이 눌렸을 때 마우스 이벤트 추적 비활성화(&D) Modified: trunk/installer/release/lang_utf8/Russian.lng =================================================================== --- trunk/installer/release/lang_utf8/Russian.lng 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/installer/release/lang_utf8/Russian.lng 2022-11-20 14:18:21 UTC (rev 10373) @@ -193,6 +193,9 @@ DLG_TAB_GENERAL_TITLEFMT_SWAPHOSTTITLE=Swap hostname and &title position DLG_TAB_GENERAL_TITLEFMT_DISPTCPPORT=Display tcp &port number DLG_TAB_GENERAL_TITLEFMT_DISPSERIALSPEED=Display se&rial port speed +DLG_TAB_GENERAL_NOTIFICATION_TITLE=Notification +DLG_TAB_GENERAL_NOTIFIY_SOUND=&Notify sound +DLG_TAB_GENERAL_NOTIFICATION_TEST=&Test DLG_TAB_SEQUENCE_ACCEPT_MOUSE_EVENT_TRACKING=Принять запрос на отслеживание событий мыши DLG_TAB_SEQUENCE_DISABLE_MOUSE_TRACKING_CTRL=&Отключить отслеживание событий мыши Modified: trunk/installer/release/lang_utf8/Simplified Chinese.lng =================================================================== --- trunk/installer/release/lang_utf8/Simplified Chinese.lng 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/installer/release/lang_utf8/Simplified Chinese.lng 2022-11-20 14:18:21 UTC (rev 10373) @@ -193,6 +193,9 @@ DLG_TAB_GENERAL_TITLEFMT_SWAPHOSTTITLE=Swap hostname and &title position DLG_TAB_GENERAL_TITLEFMT_DISPTCPPORT=Display tcp &port number DLG_TAB_GENERAL_TITLEFMT_DISPSERIALSPEED=Display se&rial port speed +DLG_TAB_GENERAL_NOTIFICATION_TITLE=Notification +DLG_TAB_GENERAL_NOTIFIY_SOUND=&Notify sound +DLG_TAB_GENERAL_NOTIFICATION_TEST=&Test DLG_TAB_SEQUENCE_ACCEPT_MOUSE_EVENT_TRACKING=接受鼠标事件跟踪请求(&M) DLG_TAB_SEQUENCE_DISABLE_MOUSE_TRACKING_CTRL=按下 Ctrl 键时,禁用鼠标事件跟踪(&D) Modified: trunk/installer/release/lang_utf8/Spanish.lng =================================================================== --- trunk/installer/release/lang_utf8/Spanish.lng 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/installer/release/lang_utf8/Spanish.lng 2022-11-20 14:18:21 UTC (rev 10373) @@ -183,6 +183,9 @@ DLG_TAB_GENERAL_TITLEFMT_SWAPHOSTTITLE=Swap hostname and &title position DLG_TAB_GENERAL_TITLEFMT_DISPTCPPORT=Display tcp &port number DLG_TAB_GENERAL_TITLEFMT_DISPSERIALSPEED=Display se&rial port speed +DLG_TAB_GENERAL_NOTIFICATION_TITLE=Notification +DLG_TAB_GENERAL_NOTIFIY_SOUND=&Notify sound +DLG_TAB_GENERAL_NOTIFICATION_TEST=&Test DLG_TAB_SEQUENCE_ACCEPT_MOUSE_EVENT_TRACKING=Accept &mouse event tracking request DLG_TAB_SEQUENCE_DISABLE_MOUSE_TRACKING_CTRL=&Disable mouse event tracking when Control is pressed Modified: trunk/installer/release/lang_utf8/Traditional Chinese.lng =================================================================== --- trunk/installer/release/lang_utf8/Traditional Chinese.lng 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/installer/release/lang_utf8/Traditional Chinese.lng 2022-11-20 14:18:21 UTC (rev 10373) @@ -193,6 +193,9 @@ DLG_TAB_GENERAL_TITLEFMT_SWAPHOSTTITLE=Swap hostname and &title position DLG_TAB_GENERAL_TITLEFMT_DISPTCPPORT=Display tcp &port number DLG_TAB_GENERAL_TITLEFMT_DISPSERIALSPEED=Display se&rial port speed +DLG_TAB_GENERAL_NOTIFICATION_TITLE=Notification +DLG_TAB_GENERAL_NOTIFIY_SOUND=&Notify sound +DLG_TAB_GENERAL_NOTIFICATION_TEST=&Test DLG_TAB_SEQUENCE_ACCEPT_MOUSE_EVENT_TRACKING=接受滑鼠事件跟蹤請求(&M) DLG_TAB_SEQUENCE_DISABLE_MOUSE_TRACKING_CTRL=按下 Ctrl 鍵時,禁用滑鼠事件跟蹤(&D) Modified: trunk/teraterm/common/tt_res.h =================================================================== --- trunk/teraterm/common/tt_res.h 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/teraterm/common/tt_res.h 2022-11-20 14:18:21 UTC (rev 10373) @@ -233,6 +233,9 @@ #define IDC_DISABLE_PRINT_START 2614 #define IDC_BEEP_LABEL 2615 #define IDC_BEEP_DROPDOWN 2616 +#define IDC_NOTIFICATION_TITLE 2617 +#define IDC_NOTIFY_SOUND 2618 +#define IDC_NOTIFICATION_TEST 2619 #define ID_ACC_SENDBREAK 50001 #define ID_ACC_COPY 50002 #define ID_ACC_NEWCONNECTION 50003 @@ -332,7 +335,7 @@ #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 132 #define _APS_NEXT_COMMAND_VALUE 52031 -#define _APS_NEXT_CONTROL_VALUE 2614 +#define _APS_NEXT_CONTROL_VALUE 2620 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif Modified: trunk/teraterm/common/tttypes.h =================================================================== --- trunk/teraterm/common/tttypes.h 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/teraterm/common/tttypes.h 2022-11-20 14:18:21 UTC (rev 10373) @@ -614,6 +614,7 @@ HINSTANCE TeraTermInstance; WORD WindowCornerDontround; wchar_t DialogFontNameW[LF_FACESIZE]; + BOOL NotifySound; // Experimental BYTE ExperimentalTreeProprtySheetEnable; Modified: trunk/teraterm/teraterm/addsetting.cpp =================================================================== --- trunk/teraterm/teraterm/addsetting.cpp 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/teraterm/teraterm/addsetting.cpp 2022-11-20 14:18:21 UTC (rev 10373) @@ -42,6 +42,7 @@ #include "teraterm.h" #include "tttypes.h" #include "ttwinman.h" // for ts +#define TTCMN_NOTIFY_INTERNAL #include "ttcommon.h" #include "dlglib.h" #include "compat_win.h" @@ -69,6 +70,20 @@ // CGeneralPropPageDlg \x83_\x83C\x83A\x83\x8D\x83O +// General Page +class CGeneralPropPageDlg : public TTCPropertyPage +{ +public: + CGeneralPropPageDlg(HINSTANCE inst); + virtual ~CGeneralPropPageDlg(); +private: + void OnInitDialog(); + void OnOK(); + enum { IDD = IDD_TABSHEET_GENERAL }; + void OnHelp(); + BOOL OnCommand(WPARAM wParam, LPARAM lParam); +}; + CGeneralPropPageDlg::CGeneralPropPageDlg(HINSTANCE inst) : TTCPropertyPage(inst, CGeneralPropPageDlg::IDD) { @@ -105,7 +120,10 @@ { IDC_TITLEFMT_DISPVTTEK, "DLG_TAB_GENERAL_TITLEFMT_DISPVTTEK" }, { IDC_TITLEFMT_SWAPHOSTTITLE, "DLG_TAB_GENERAL_TITLEFMT_SWAPHOSTTITLE" }, { IDC_TITLEFMT_DISPTCPPORT, "DLG_TAB_GENERAL_TITLEFMT_DISPTCPPORT" }, - { IDC_TITLEFMT_DISPSERIALSPEED, "DLG_TAB_GENERAL_TITLEFMT_DISPSERIALSPEED" } + { IDC_TITLEFMT_DISPSERIALSPEED, "DLG_TAB_GENERAL_TITLEFMT_DISPSERIALSPEED" }, + { IDC_NOTIFICATION_TITLE, "DLG_TAB_GENERAL_NOTIFICATION_TITLE" }, + { IDC_NOTIFY_SOUND, "DLG_TAB_GENERAL_NOTIFIY_SOUND" }, + { IDC_NOTIFICATION_TEST, "DLG_TAB_GENERAL_NOTIFICATION_TEST" }, }; SetDlgTextsW(m_hWnd, TextInfos, _countof(TextInfos), ts.UILanguageFileW); @@ -141,6 +159,9 @@ SetCheck(IDC_TITLEFMT_DISPTCPPORT, (ts.TitleFormat & (1<<4)) != 0); SetCheck(IDC_TITLEFMT_DISPSERIALSPEED, (ts.TitleFormat & (1<<5)) != 0); + // Notify + SetCheck(IDC_NOTIFY_SOUND, ts.NotifySound); + // \x83_\x83C\x83A\x83\x8D\x83O\x82Ƀt\x83H\x81[\x83J\x83X\x82Ă\xE9 (2004.12.7 yutaka) ::SetFocus(::GetDlgItem(GetSafeHwnd(), IDC_CLICKABLE_URL)); } @@ -188,6 +209,16 @@ ts.TitleFormat |= (GetCheck(IDC_TITLEFMT_SWAPHOSTTITLE) == BST_CHECKED) << 3; ts.TitleFormat |= (GetCheck(IDC_TITLEFMT_DISPTCPPORT) == BST_CHECKED) << 4; ts.TitleFormat |= (GetCheck(IDC_TITLEFMT_DISPSERIALSPEED) == BST_CHECKED) << 5; + + // Notify + { + BOOL notify_sound = (BOOL)GetCheck(IDC_NOTIFY_SOUND); + if (notify_sound != ts.NotifySound) { + PComVar pcv = &cv; + ts.NotifySound = notify_sound; + NotifySetSound(pcv, notify_sound); + } + } } void CGeneralPropPageDlg::OnHelp() @@ -195,6 +226,25 @@ PostMessage(HVTWin, WM_USER_DLGHELP2, HlpMenuSetupAdditional, 0); } +BOOL CGeneralPropPageDlg::OnCommand(WPARAM wParam, LPARAM lParam) +{ + switch (wParam) { + case IDC_NOTIFICATION_TEST | (BN_CLICKED << 16): { + PComVar pcv = &cv; + wchar_t *msg = L"Test button was pushed"; + BOOL prev_sound = NotifyGetSound(pcv); + BOOL notify_sound = (BOOL)GetCheck(IDC_NOTIFY_SOUND); + NotifySetSound(pcv, notify_sound); + NotifyMessageW(pcv, msg, NULL, 1); + NotifySetSound(pcv, prev_sound); + break; + } + default: + break; + } + return TTCPropertyPage::OnCommand(wParam, lParam); +} + // CSequencePropPageDlg \x83_\x83C\x83A\x83\x8D\x83O CSequencePropPageDlg::CSequencePropPageDlg(HINSTANCE inst) @@ -847,7 +897,7 @@ case SB_PAGEUP: case SB_THUMBPOSITION: case SB_THUMBTRACK: - pos = SendDlgItemMessage(IDC_ALPHA_BLEND_ACTIVE_TRACKBAR, TBM_GETPOS, NULL, NULL); + pos = (int)SendDlgItemMessage(IDC_ALPHA_BLEND_ACTIVE_TRACKBAR, TBM_GETPOS, NULL, NULL); SetDlgItemNum(IDC_ALPHA_BLEND_ACTIVE, pos); break; case SB_ENDSCROLL: @@ -865,7 +915,7 @@ case SB_PAGEUP: case SB_THUMBPOSITION: case SB_THUMBTRACK: - pos = SendDlgItemMessage(IDC_ALPHA_BLEND_INACTIVE_TRACKBAR, TBM_GETPOS, NULL, NULL); + pos = (int)SendDlgItemMessage(IDC_ALPHA_BLEND_INACTIVE_TRACKBAR, TBM_GETPOS, NULL, NULL); SetDlgItemNum(IDC_ALPHA_BLEND_INACTIVE, pos); break; case SB_ENDSCROLL: @@ -895,8 +945,6 @@ BOOL CVisualPropPageDlg::OnCommand(WPARAM wParam, LPARAM lParam) { - int sel; - switch (wParam) { case IDC_THEME_EDITOR_BUTTON | (BN_CLICKED << 16): { ThemeDialog(m_hInst, m_hWnd, &cv); @@ -944,13 +992,14 @@ return TRUE; } - case IDC_ANSI_COLOR | (LBN_SELCHANGE << 16): - sel = SendDlgItemMessage(IDC_ANSI_COLOR, LB_GETCURSEL, 0, 0); + case IDC_ANSI_COLOR | (LBN_SELCHANGE << 16): { + int sel = (int)SendDlgItemMessage(IDC_ANSI_COLOR, LB_GETCURSEL, 0, 0); if (sel != -1) { SetupRGBbox(sel); ::InvalidateRect(GetDlgItem(IDC_SAMPLE_COLOR), NULL, TRUE); } return TRUE; + } case IDC_COLOR_RED | (EN_CHANGE << 16) : case IDC_COLOR_GREEN | (EN_CHANGE << 16) : @@ -957,6 +1006,7 @@ case IDC_COLOR_BLUE | (EN_CHANGE << 16) : { int r, g, b; + int sel; sel = GetCurSel(IDC_ANSI_COLOR); if (sel < 0 || sel > _countof(ANSIColor)-1) { Modified: trunk/teraterm/teraterm/addsetting.h =================================================================== --- trunk/teraterm/teraterm/addsetting.h 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/teraterm/teraterm/addsetting.h 2022-11-20 14:18:21 UTC (rev 10373) @@ -41,19 +41,6 @@ extern const mouse_cursor_t MouseCursor[]; -// General Page -class CGeneralPropPageDlg : public TTCPropertyPage -{ -public: - CGeneralPropPageDlg(HINSTANCE inst); - virtual ~CGeneralPropPageDlg(); -private: - void OnInitDialog(); - void OnOK(); - enum { IDD = IDD_TABSHEET_GENERAL }; - void OnHelp(); -}; - // Control Sequence Page class CSequencePropPageDlg : public TTCPropertyPage { Modified: trunk/teraterm/teraterm/ttermpro.rc =================================================================== --- trunk/teraterm/teraterm/ttermpro.rc 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/teraterm/teraterm/ttermpro.rc 2022-11-20 14:18:21 UTC (rev 10373) @@ -53,7 +53,7 @@ LTEXT "Drop with CTRL, this dialog is displayed",IDC_DAD_NOTE,7,221,236,8 END -IDD_TABSHEET_GENERAL DIALOGEX 0, 0, 258, 188 +IDD_TABSHEET_GENERAL DIALOGEX 0, 0, 258, 239 STYLE DS_SETFONT | DS_CONTROL | WS_CHILD | WS_SYSMENU FONT 8, "Tahoma", 0, 0, 0x0 BEGIN @@ -83,6 +83,9 @@ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,120,155,130,10 CONTROL "Display se&rial port speed",IDC_TITLEFMT_DISPSERIALSPEED, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,120,170,130,10 + LTEXT "Notification",IDC_NOTIFICATION_TITLE,12,188,73,8 + CONTROL "&Notify sound",IDC_NOTIFY_SOUND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,21,201,220,10 + PUSHBUTTON "&Test",IDC_NOTIFICATION_TEST,20,215,50,14 END IDD_TABSHEET_SEQUENCE DIALOGEX 0, 0, 258, 204 @@ -382,7 +385,7 @@ LEFTMARGIN, 5 RIGHTMARGIN, 252 TOPMARGIN, 5 - BOTTOMMARGIN, 185 + BOTTOMMARGIN, 234 END IDD_TABSHEET_SEQUENCE, DIALOG @@ -509,18 +512,26 @@ // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDI_TTERM ICON "../common/teraterm.ico" + IDI_VT ICON "../common/vt.ico" + IDI_TEK ICON "../common/tek.ico" + IDI_TTERM_CLASSIC ICON "../common/teraterm_classic.ico" + IDI_VT_CLASSIC ICON "../common/vt_classic.ico" + IDI_CYGTERM ICON "../../cygwin/cygterm/cygterm.ico" + IDI_TTERM_3D ICON "../common/teraterm_3d.ico" + IDI_VT_3D ICON "../common/vt_3d.ico" + IDI_TTERM_FLAT ICON "../common/teraterm_flat.ico" + IDI_VT_FLAT ICON "../common/vt_flat.ico" - ///////////////////////////////////////////////////////////////////////////// // // Menu Modified: trunk/teraterm/teraterm/vtwin.cpp =================================================================== --- trunk/teraterm/teraterm/vtwin.cpp 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/teraterm/teraterm/vtwin.cpp 2022-11-20 14:18:21 UTC (rev 10373) @@ -438,6 +438,7 @@ // \x92ʒm\x97̈揉\x8A\xFA\x89\xBB NotifyInitialize(&cv); NotifySetWindow(&cv, m_hWnd, WM_USER_NOTIFYICON, m_hInst, (ts.VTIcon != IdIconDefault) ? ts.VTIcon: IDI_VT); + NotifySetSound(&cv, ts.NotifySound); // VT \x83E\x83B\x83\x93\x83h\x83E\x82̃A\x83C\x83R\x83\x93 SetVTIconID(&cv, NULL, 0); Modified: trunk/teraterm/ttpcmn/ttcmn_notify.cpp =================================================================== --- trunk/teraterm/ttpcmn/ttcmn_notify.cpp 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/teraterm/ttpcmn/ttcmn_notify.cpp 2022-11-20 14:18:21 UTC (rev 10373) @@ -126,9 +126,10 @@ /** * * @param flag NOTIFYICONDATA.dwInfoFlags - * 1 information icon - * 2 warning icon - * 3 error icon + * 1 information icon (NIIF_INFO) + * 2 warning icon (NIIF_WARNING) + * 3 error icon (NIIF_ERROR) + * 0x10 (NIIF_NOSOUND) XP+ */ static void NotifySetMessageW(NotifyIcon *ni, const wchar_t *msg, const wchar_t *title, DWORD flag) { @@ -144,6 +145,7 @@ } if (ni->no_sound) { + // shell32.dll 6.00(XP)+ flag |= NIIF_NOSOUND; } @@ -236,6 +238,16 @@ free(ni); } +static void NotifySetSound(NotifyIcon *ni, BOOL sound) +{ + ni->no_sound = sound == FALSE ? TRUE : FALSE; +} + +static BOOL NotifyGetSound(NotifyIcon *ni) +{ + return ni->no_sound; +} + static NotifyIcon *GetNotifyData(PComVar cv) { assert(cv != NULL); @@ -268,6 +280,18 @@ free(msgW); } +DllExport void NotifySetSound(PComVar cv, BOOL sound) +{ + NotifyIcon *ni = GetNotifyData(cv); + NotifySetSound(ni, sound); +} + +DllExport BOOL NotifyGetSound(PComVar cv) +{ + NotifyIcon *ni = GetNotifyData(cv); + return NotifyGetSound(ni); +} + /** * \x92ʒm\x97̈揉\x8A\xFA\x89\xBB * Modified: trunk/teraterm/ttpcmn/ttcmn_notify.h =================================================================== --- trunk/teraterm/ttpcmn/ttcmn_notify.h 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/teraterm/ttpcmn/ttcmn_notify.h 2022-11-20 14:18:21 UTC (rev 10373) @@ -45,6 +45,8 @@ DllExport void WINAPI NotifySetWindow(PComVar cv, HWND hWnd, UINT msg, HINSTANCE hInstance, WORD IconID); DllExport void WINAPI NotifyUnsetWindow(PComVar cv); DllExport void WINAPI NotifyHideIcon(PComVar cv); +DllExport void NotifySetSound(PComVar cv, BOOL sound); +DllExport BOOL NotifyGetSound(PComVar cv); #endif // plugin \x82\xA9\x82\xE7\x82\xE0\x8Eg\x97p\x89\\x82\xC8IF Modified: trunk/teraterm/ttpset/ttset.c =================================================================== --- trunk/teraterm/ttpset/ttset.c 2022-11-20 14:18:08 UTC (rev 10372) +++ trunk/teraterm/ttpset/ttset.c 2022-11-20 14:18:21 UTC (rev 10373) @@ -2031,6 +2031,9 @@ // rounded corner preference for VT/TEK window ts->WindowCornerDontround = GetOnOff(Section, "WindowCornerDontround", FName, FALSE); + // \x92ʒm\x89\xB9 + ts->NotifySound = GetOnOff(Section, "NotifySound", FName, TRUE); + // Experimental ts->ExperimentalTreeProprtySheetEnable = GetOnOff("Experimental", "TreeProprtySheet", FName, FALSE); ts->ExperimentalDontUseFontDialog = GetOnOff("Experimental", "DontUseFontDialog", FName, FALSE); @@ -3243,8 +3246,11 @@ WriteOnOff(Section, "UnicodeEmojiOverride", FName, ts->UnicodeEmojiOverride); WriteInt(Section, "UnicodeEmojiWidth", FName, ts->UnicodeEmojiWidth); - // // rounded corner preference for VT/TEK window + // rounded corner preference for VT/TEK window WriteOnOff(Section, "WindowCornerDontround", FName, ts->WindowCornerDontround); + + // \x92ʒm\x89\xB9 + WriteOnOff(Section, "NotifySound", FName, ts->NotifySound); } void PASCAL _CopySerialList(const wchar_t *IniSrc, const wchar_t *IniDest, const wchar_t *section,