X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=w32log.c;h=ae00ba597010ee54112e7085175c7363af481265;hp=03759d693571750a4a3c30c4b78d4bae7a47c828;hb=e2f12567a6540a2b4d0fe197d9a039211a117717;hpb=7849a97c676314f36e5d1e89a350d4ebe3af5d7b diff --git a/w32log.c b/w32log.c index 03759d69..ae00ba59 100644 --- a/w32log.c +++ b/w32log.c @@ -1,4 +1,4 @@ -const char w32log_rcs[] = "$Id: w32log.c,v 1.43 2012/05/24 14:59:41 fabiankeil Exp $"; +const char w32log_rcs[] = "$Id: w32log.c,v 1.52 2016/07/28 00:38:47 ler762 Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/w32log.c,v $ @@ -41,6 +41,7 @@ const char w32log_rcs[] = "$Id: w32log.c,v 1.43 2012/05/24 14:59:41 fabiankeil E #ifndef STRICT #define STRICT #endif +#include #include #include @@ -56,11 +57,6 @@ const char w32log_rcs[] = "$Id: w32log.c,v 1.43 2012/05/24 14:59:41 fabiankeil E const char w32res_h_rcs[] = W32RES_H_VERSION; -#ifdef __MINGW32__ -#include "cygwin.h" -const char cygwin_h_rcs[] = CYGWIN_H_VERSION; -#endif - const char w32log_h_rcs[] = W32LOG_H_VERSION; #ifndef _WIN_CONSOLE /* entire file */ @@ -172,6 +168,9 @@ static struct _Pattern { "Connect: Reusing server socket", STYLE_HIGHLIGHT }, { "Connect: Created new connection to", STYLE_HIGHLIGHT }, { "hung up on us", STYLE_HIGHLIGHT }, + { "Info: Loading actions file:", STYLE_HIGHLIGHT }, + { "Info: Loading filter file:", STYLE_HIGHLIGHT }, + { "Info: Now toggled ", STYLE_HIGHLIGHT }, { "Crunching Referer:", STYLE_HIGHLIGHT }, /* what are all the possible error strings?? */ { "Error:", STYLE_HIGHLIGHT }, @@ -724,8 +723,8 @@ HWND CreateLogWindow(HINSTANCE hInstance, int nCmdShow) /* SendMessage(g_hwndLogBox, EM_SETWORDWRAPMODE, 0, 0); */ /* Subclass the control to catch certain messages */ - g_fnLogBox = (WNDPROC) GetWindowLong(g_hwndLogBox, GWL_WNDPROC); - SetWindowLong(g_hwndLogBox, GWL_WNDPROC, (LONG) LogRichEditProc); + g_fnLogBox = (WNDPROC) GetWindowLongPtr(g_hwndLogBox, GWLP_WNDPROC); + SetWindowLongPtr(g_hwndLogBox, GWLP_WNDPROC, (LONG_PTR) LogRichEditProc); /* Minimizing looks stupid when the log window is not on the task bar, so hide instead */ if (!g_bShowOnTaskBar && @@ -948,7 +947,13 @@ void OnLogCommand(int nCommand) global_toggle_state = !global_toggle_state; log_error(LOG_LEVEL_INFO, "Now toggled %s", global_toggle_state ? "ON" : "OFF"); - SetIdleIcon(); + /* + * 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 */ @@ -1176,7 +1181,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;