X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=w32log.c;h=927796df41d1e44fc9cc7d2891bc13454a90ead4;hb=81471709ec12ed60c7e6d10a5d83568c79563b8b;hp=9c92131a4132530581c3ed30ce1c305a952299cb;hpb=3ae8d3e7c9377291ce4f65a8578729e07a61dd36;p=privoxy.git diff --git a/w32log.c b/w32log.c index 9c92131a..927796df 100644 --- a/w32log.c +++ b/w32log.c @@ -1,4 +1,4 @@ -const char w32log_rcs[] = "$Id: w32log.c,v 1.29 2008/12/20 15:27:40 ler762 Exp $"; +const char w32log_rcs[] = "$Id: w32log.c,v 1.32 2009/03/09 18:32:48 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/w32log.c,v $ @@ -6,7 +6,7 @@ const char w32log_rcs[] = "$Id: w32log.c,v 1.29 2008/12/20 15:27:40 ler762 Exp $ * Purpose : Functions for creating and destroying the log window, * ouputting strings, processing messages and so on. * - * Copyright : Written by and Copyright (C) 2001-2002 members of + * Copyright : Written by and Copyright (C) 2001-2009 members of * the Privoxy team. http://www.privoxy.org/ * * Written by and Copyright (C) 1999 Adam Lock @@ -32,6 +32,18 @@ const char w32log_rcs[] = "$Id: w32log.c,v 1.29 2008/12/20 15:27:40 ler762 Exp $ * * Revisions : * $Log: w32log.c,v $ + * Revision 1.32 2009/03/09 18:32:48 fabiankeil + * Use the Privoxy icon in the alt+tab window. + * Patch submitted by Burberry in #2674342. + * + * Revision 1.31 2009/03/07 17:58:02 fabiankeil + * Fix two mingw32-only buffer overflows. Note that triggering + * them requires control over the configuration file in which + * case all bets are off anyway. + * + * Revision 1.30 2009/01/01 15:09:23 ler762 + * Change the Windows taskbar icon when privoxy is toggled off. + * * Revision 1.29 2008/12/20 15:27:40 ler762 * The crunch log message format changed, so update the strings to highlight * in the log window. @@ -284,7 +296,7 @@ BOOL g_bLimitBufferSize = 1; int g_nMaxBufferLines = DEFAULT_MAX_BUFFER_LINES; /* Font to use */ -char g_szFontFaceName[255] = DEFAULT_LOG_FONT_NAME; +char g_szFontFaceName[32] = DEFAULT_LOG_FONT_NAME; /* Size of font to use */ int g_nFontSize = DEFAULT_LOG_FONT_SIZE; @@ -702,9 +714,11 @@ int LogPutStringNoMatch(const char *pszText, int style) /* Apply a formatting style */ memset(&format, 0, sizeof(format)); format.cbSize = sizeof(format); - format.dwMask = CFM_BOLD | CFM_UNDERLINE | CFM_STRIKEOUT | CFM_ITALIC | CFM_COLOR | CFM_FACE | CFM_SIZE; + format.dwMask = CFM_BOLD | CFM_UNDERLINE | CFM_STRIKEOUT | + CFM_ITALIC | CFM_COLOR | CFM_FACE | CFM_SIZE | CFM_CHARSET; + format.bCharSet = DEFAULT_CHARSET; format.yHeight = (g_nFontSize * 1440) / 72; - strcpy(format.szFaceName, g_szFontFaceName); + strlcpy(format.szFaceName, g_szFontFaceName, sizeof(format.szFaceName)); if (style == STYLE_NONE) { /* DO NOTHING */ @@ -843,7 +857,7 @@ HWND CreateHiddenLogOwnerWindow(HINSTANCE hInstance) wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; - wc.hIcon = 0; + wc.hIcon = g_hiconApp; wc.hCursor = 0; wc.hbrBackground = 0; wc.lpszMenuName = 0;