Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/teraterm/ttpcmn/ttcmn.c

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

revision 6664 by doda, Mon Apr 3 12:51:43 2017 UTC revision 6684 by doda, Wed Apr 12 09:00:39 2017 UTC
# Line 2383  int PASCAL CheckComPort(WORD ComPort) Line 2383  int PASCAL CheckComPort(WORD ComPort)
2383    
2384  // Notify Icon 関連  // Notify Icon 関連
2385  static NOTIFYICONDATA notify_icon = {0};  static NOTIFYICONDATA notify_icon = {0};
2386    static int NotifyIconShowCount = 0;
2387    
2388  void FAR PASCAL CreateNotifyIcon(PComVar cv)  void FAR PASCAL CreateNotifyIcon(PComVar cv)
2389  {  {
# Line 2404  void FAR PASCAL CreateNotifyIcon(PComVar Line 2405  void FAR PASCAL CreateNotifyIcon(PComVar
2405                  cv->NotifyIcon = &notify_icon;                  cv->NotifyIcon = &notify_icon;
2406    
2407                  Shell_NotifyIcon(NIM_ADD, cv->NotifyIcon);                  Shell_NotifyIcon(NIM_ADD, cv->NotifyIcon);
2408    
2409                    NotifyIconShowCount = 0;
2410          }          }
2411    
2412          return;          return;
# Line 2414  void FAR PASCAL DeleteNotifyIcon(PComVar Line 2417  void FAR PASCAL DeleteNotifyIcon(PComVar
2417          if (cv->NotifyIcon) {          if (cv->NotifyIcon) {
2418                  Shell_NotifyIcon(NIM_DELETE, cv->NotifyIcon);                  Shell_NotifyIcon(NIM_DELETE, cv->NotifyIcon);
2419                  cv->NotifyIcon = NULL;                  cv->NotifyIcon = NULL;
2420                    NotifyIconShowCount = 0;
2421          }          }
2422    
2423          return;          return;
# Line 2429  void FAR PASCAL ShowNotifyIcon(PComVar c Line 2433  void FAR PASCAL ShowNotifyIcon(PComVar c
2433          cv->NotifyIcon->dwState = 0;          cv->NotifyIcon->dwState = 0;
2434          cv->NotifyIcon->dwStateMask = NIS_HIDDEN;          cv->NotifyIcon->dwStateMask = NIS_HIDDEN;
2435          Shell_NotifyIcon(NIM_MODIFY, cv->NotifyIcon);          Shell_NotifyIcon(NIM_MODIFY, cv->NotifyIcon);
2436            NotifyIconShowCount += 1;
2437    
2438          return;          return;
2439  }  }
2440    
2441  void FAR PASCAL HideNotifyIcon(PComVar cv)  void FAR PASCAL HideNotifyIcon(PComVar cv)
2442  {  {
2443          if (cv->NotifyIcon) {          if (NotifyIconShowCount > 1) {
2444                  cv->NotifyIcon->uFlags = NIF_STATE;                  NotifyIconShowCount -= 1;
                 cv->NotifyIcon->dwState = NIS_HIDDEN;  
                 cv->NotifyIcon->dwStateMask = NIS_HIDDEN;  
                 Shell_NotifyIcon(NIM_MODIFY, cv->NotifyIcon);  
2445          }          }
2446            else {
2447                    if (cv->NotifyIcon) {
2448                            cv->NotifyIcon->uFlags = NIF_STATE;
2449                            cv->NotifyIcon->dwState = NIS_HIDDEN;
2450                            cv->NotifyIcon->dwStateMask = NIS_HIDDEN;
2451                            Shell_NotifyIcon(NIM_MODIFY, cv->NotifyIcon);
2452                    }
2453                    NotifyIconShowCount = 0;
2454            }
2455    
2456          return;          return;
2457  }  }
2458    
# Line 2479  void FAR PASCAL NotifyMessage(PComVar cv Line 2492  void FAR PASCAL NotifyMessage(PComVar cv
2492    
2493          Shell_NotifyIcon(NIM_MODIFY, cv->NotifyIcon);          Shell_NotifyIcon(NIM_MODIFY, cv->NotifyIcon);
2494    
2495            NotifyIconShowCount += 1;
2496    
2497          return;          return;
2498  }  }
2499    

Legend:
Removed from v.6664  
changed lines
  Added in v.6684

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