Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/teraterm/teraterm/addsetting.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 10388 by zmatsuo, Mon Nov 28 13:56:09 2022 UTC revision 10394 by zmatsuo, Sat Dec 3 06:40:18 2022 UTC
# Line 42  Line 42 
42  #include "teraterm.h"  #include "teraterm.h"
43  #include "tttypes.h"  #include "tttypes.h"
44  #include "ttwinman.h"   // for ts  #include "ttwinman.h"   // for ts
 #define TTCMN_NOTIFY_INTERNAL  
 #include "ttcommon.h"  
45  #include "dlglib.h"  #include "dlglib.h"
46  #include "compat_win.h"  #include "compat_win.h"
47  #include "helpid.h"  #include "helpid.h"
# Line 58  Line 56 
56  #include "win32helper.h"  #include "win32helper.h"
57  #include "themedlg.h"  #include "themedlg.h"
58  #include "theme.h"  #include "theme.h"
59    #include "ttcmn_notify2.h"
60    
61  const mouse_cursor_t MouseCursor[] = {  const mouse_cursor_t MouseCursor[] = {
62          {"ARROW", IDC_ARROW},          {"ARROW", IDC_ARROW},
# Line 214  void CGeneralPropPageDlg::OnOK() Line 213  void CGeneralPropPageDlg::OnOK()
213          {          {
214                  BOOL notify_sound = (BOOL)GetCheck(IDC_NOTIFY_SOUND);                  BOOL notify_sound = (BOOL)GetCheck(IDC_NOTIFY_SOUND);
215                  if (notify_sound != ts.NotifySound) {                  if (notify_sound != ts.NotifySound) {
                         PComVar pcv = &cv;  
216                          ts.NotifySound = notify_sound;                          ts.NotifySound = notify_sound;
217                          NotifySetSound(pcv, notify_sound);                          Notify2SetSound((NotifyIcon *)cv.NotifyIcon, notify_sound);
218                  }                  }
219          }          }
220  }  }
# Line 230  BOOL CGeneralPropPageDlg::OnCommand(WPAR Line 228  BOOL CGeneralPropPageDlg::OnCommand(WPAR
228  {  {
229          switch (wParam) {          switch (wParam) {
230                  case IDC_NOTIFICATION_TEST | (BN_CLICKED << 16): {                  case IDC_NOTIFICATION_TEST | (BN_CLICKED << 16): {
231                          PComVar pcv = &cv;                          NotifyIcon *ni = (NotifyIcon *)cv.NotifyIcon;
232                          const wchar_t *msg = L"Test button was pushed";                          const wchar_t *msg = L"Test button was pushed";
233                          BOOL prev_sound = NotifyGetSound(pcv);                          BOOL prev_sound = Notify2GetSound(ni);
234                          BOOL notify_sound = (BOOL)GetCheck(IDC_NOTIFY_SOUND);                          BOOL notify_sound = (BOOL)GetCheck(IDC_NOTIFY_SOUND);
235                          NotifySetSound(pcv, notify_sound);                          Notify2SetSound(ni, notify_sound);
236                          NotifyMessageW(pcv, msg, NULL, 1);                          Notify2SetMessageW(ni, msg, NULL, 1);
237                          NotifySetSound(pcv, prev_sound);                          Notify2SetSound(ni, prev_sound);
238                          break;                          break;
239                  }                  }
240                  default:                  default:

Legend:
Removed from v.10388  
changed lines
  Added in v.10394

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26