/********************************************************************* * * Function : SetIdleIcon * * Description : Sets the tray icon to either idle or off * * Parameters : none * * Returns : N/A * *********************************************************************/ void SetIdleIcon() { #ifdef FEATURE_TOGGLE if (!global_toggle_state) { TraySetIcon(g_hwndTray, 1, g_hiconOff); } else #endif /* def FEATURE_TOGGLE */ TraySetIcon(g_hwndTray, 1, g_hiconIdle); }
/********************************************************************* * * Function : SetIdleIcon * * Description : Sets the tray icon to either idle or off * * Parameters : none * * Returns : N/A * *********************************************************************/ void SetIdleIcon() { #ifdef FEATURE_TOGGLE if (!global_toggle_state) { TraySetIcon(g_hwndTray, 1, g_hiconOff); /* log_error(LOG_LEVEL_INFO, "Privoxy OFF icon selected."); */ } else #endif /* def FEATURE_TOGGLE */ TraySetIcon(g_hwndTray, 1, g_hiconIdle); }
/********************************************************************* * * Function : OnLogTimer * * Description : Handler for WM_TIMER messages. * * Parameters : * 1 : nTimer = timer id (animation start/stop or clip buffer) * * Returns : N/A * *********************************************************************/ void OnLogTimer(int nTimer) { switch (nTimer) { case TIMER_ANIM_ID: TraySetIcon(g_hwndTray, 1, g_hiconAnim[g_nAnimFrame++ % ANIM_FRAMES]); break; case TIMER_ANIMSTOP_ID: g_nAnimFrame = 0; SetIdleIcon(); KillTimer(g_hwndLogFrame, TIMER_ANIM_ID); KillTimer(g_hwndLogFrame, TIMER_ANIMSTOP_ID); break; case TIMER_CLIPBUFFER_ID: case TIMER_CLIPBUFFER_FORCE_ID: LogClipBuffer(); g_bClipPending = FALSE; KillTimer(g_hwndLogFrame, TIMER_CLIPBUFFER_ID); KillTimer(g_hwndLogFrame, TIMER_CLIPBUFFER_FORCE_ID); break; default: /* DO NOTHING */ break; } }
void CTrayDialog::TraySetIcon(LPCTSTR lpszResourceName) { TraySetIcon(AfxGetApp()->LoadIcon(lpszResourceName)); }
void CTrayDialog::TraySetIcon(UINT nResourceID) { TraySetIcon(AfxGetApp()->LoadIcon(nResourceID)); }