X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=w32log.c;h=bc795de2c587d25cd0be44692769ccff4ff6dae8;hp=d688c58895fa5b805a4e958e0dd78f7186e1d676;hb=ce0ea8254f2b29a19e40dcda64d36d6a33b8548c;hpb=f284d0b1f6370d9dc26aa121a10ebbdac549ebb4 diff --git a/w32log.c b/w32log.c index d688c588..bc795de2 100644 --- a/w32log.c +++ b/w32log.c @@ -1,4 +1,4 @@ -const char w32log_rcs[] = "$Id: w32log.c,v 1.41 2012/03/09 16:23:50 fabiankeil Exp $"; +const char w32log_rcs[] = "$Id: w32log.c,v 1.45 2012/05/24 15:05:17 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/w32log.c,v $ @@ -944,18 +944,17 @@ void OnLogCommand(int nCommand) break; #ifdef FEATURE_TOGGLE - /* by haroon - change toggle to its opposite value */ case ID_TOGGLE_ENABLED: global_toggle_state = !global_toggle_state; - if (global_toggle_state) - { - log_error(LOG_LEVEL_INFO, "Now toggled ON."); - } - else - { - log_error(LOG_LEVEL_INFO, "Now toggled OFF."); - } - SetIdleIcon(); + log_error(LOG_LEVEL_INFO, + "Now toggled %s", global_toggle_state ? "ON" : "OFF"); + /* + * Leverage TIMER_ANIMSTOP_ID to set the idle icon through the + * "application queue". According to MSDN, 10 milliseconds are + * the lowest value possible and seem to be close enough to + * "instantly". + */ + SetTimer(g_hwndLogFrame, TIMER_ANIMSTOP_ID, 10, NULL); break; #endif /* def FEATURE_TOGGLE */ @@ -1183,7 +1182,7 @@ LRESULT CALLBACK LogWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPara return 0; case WM_CLOSE: - /* This is the end - beautiful friend - the end */ + /* This is the end - my only friend - the end */ DestroyWindow(g_hwndLogBox); DestroyWindow(g_hwndLogFrame); return 0;