From: Lee Date: Sun, 2 Nov 2008 14:37:47 +0000 (+0000) Subject: commit the part of the patches I've been using that were written by torford and gjmurphy X-Git-Tag: v_3_0_11~184 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=b10f2cec8f120216342e340efe477a887ac8ce11 commit the part of the patches I've been using that were written by torford and gjmurphy [ 1824315 ] Minor code cleanup [ 1781135 ] Patch - Add clear log, select all, and Accelerators for w32 http://sourceforge.net/tracker/?func=detail&atid=311118&aid=1781135&group_id=11118 The full patch adds control keys A(select all), C(copy) and D(delete all) to the Privoxy log window menu. Select all and copy work for me without the patch (albeit without showing the accelerator keys on the menu), so the only part of the patch I've been using for the last year or so has been the ctrl-d to delete everything in the Privoxy log window. --- diff --git a/w32.rc b/w32.rc index 62a0daba..e5b20a41 100644 --- a/w32.rc +++ b/w32.rc @@ -31,6 +31,10 @@ * * Revisions : * $Log: w32.rc,v $ + * Revision 1.20 2006/08/18 02:06:25 david__schmidt + * Making icon go back to blue when idle. + * See: bug #967648. + * * Revision 1.19 2006/07/18 14:48:48 david__schmidt * Reorganizing the repository: swapping out what was HEAD (the old 3.1 branch) * with what was really the latest development (the v_3_0_branch branch) @@ -269,7 +273,7 @@ BEGIN END POPUP "&View" BEGIN - MENUITEM "&Clear Log", ID_VIEW_CLEARLOG + MENUITEM "&Clear Log\tCtrl+D", ID_VIEW_CLEARLOG MENUITEM SEPARATOR MENUITEM "&Log Messages", ID_VIEW_LOGMESSAGES, CHECKED MENUITEM "Message &Highlighting", ID_VIEW_MESSAGEHIGHLIGHTING, CHECKED @@ -318,6 +322,7 @@ END IDR_ACCELERATOR ACCELERATORS DISCARDABLE BEGIN "C", ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT + "D", ID_VIEW_CLEARLOG, VIRTKEY, CONTROL, NOINVERT END #endif /* English (U.S.) resources */ diff --git a/w32log.c b/w32log.c index 732c0a3b..6543fae4 100644 --- a/w32log.c +++ b/w32log.c @@ -1,7 +1,7 @@ -const char w32log_rcs[] = "$Id: w32log.c,v 1.25.2.5 2003/04/04 12:48:51 oes Exp $"; +const char w32log_rcs[] = "$Id: w32log.c,v 1.27 2006/07/18 14:48:48 david__schmidt Exp $"; /********************************************************************* * - * File : $Source: /cvsroot/ijbswa/current/Attic/w32log.c,v $ + * File : $Source: /cvsroot/ijbswa/current/w32log.c,v $ * * Purpose : Functions for creating and destroying the log window, * ouputting strings, processing messages and so on. @@ -32,6 +32,10 @@ const char w32log_rcs[] = "$Id: w32log.c,v 1.25.2.5 2003/04/04 12:48:51 oes Exp * * Revisions : * $Log: w32log.c,v $ + * Revision 1.27 2006/07/18 14:48:48 david__schmidt + * Reorganizing the repository: swapping out what was HEAD (the old 3.1 branch) + * with what was really the latest development (the v_3_0_branch branch) + * * Revision 1.25.2.5 2003/04/04 12:48:51 oes * Fixed bug #711865: * - Made tray menu correctly reflect initial window visibility state @@ -1294,8 +1298,16 @@ LRESULT CALLBACK LogRichEditProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa pt.y = HIWORD(lParam); ClientToScreen(hwnd, &pt); OnLogRButtonUp(wParam, pt.x, pt.y); + return 0; + } + case WM_CHAR: + { + if ((GetKeyState(VK_CONTROL) != 0) && (wParam == 4)) /* ctrl+d */ + { + OnLogCommand(ID_VIEW_CLEARLOG); + return 0; + } } - return 0; } return CallWindowProc(g_fnLogBox, hwnd, uMsg, wParam, lParam); @@ -1373,6 +1385,14 @@ LRESULT CALLBACK LogWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPara return 0; } break; + + case WM_CHAR: + if ((GetKeyState(VK_CONTROL) != 0) && (wParam == 4)) /* ctrl+d */ + { + OnLogCommand(ID_VIEW_CLEARLOG); + return 0; + } + break; } return DefWindowProc(hwnd, uMsg, wParam, lParam); diff --git a/w32res.h b/w32res.h index 843359a3..ffe1b1b5 100644 --- a/w32res.h +++ b/w32res.h @@ -1,9 +1,9 @@ #ifndef W32RES_H_INCLUDED #define W32RES_H_INCLUDED -#define W32RES_H_VERSION "$Id: w32res.h,v 1.13.2.1 2002/08/21 17:59:06 oes Exp $" +#define W32RES_H_VERSION "$Id: w32res.h,v 1.15 2006/07/18 14:48:48 david__schmidt Exp $" /********************************************************************* * - * File : $Source: /cvsroot/ijbswa/current/Attic/w32res.h,v $ + * File : $Source: /cvsroot/ijbswa/current/w32res.h,v $ * * Purpose : Identifiers for Windows GUI resources. * @@ -34,6 +34,10 @@ * * Revisions : * $Log: w32res.h,v $ + * Revision 1.15 2006/07/18 14:48:48 david__schmidt + * Reorganizing the repository: swapping out what was HEAD (the old 3.1 branch) + * with what was really the latest development (the v_3_0_branch branch) + * * Revision 1.13.2.1 2002/08/21 17:59:06 oes * - "Show Privoxy Window" now a toggle * - Temp kludge to let user and default action file be edited through win32 GUI (FR 592080) @@ -163,13 +167,6 @@ #define ID_TOOLS_EDITTRUST 5004 #endif /* def FEATURE_TRUST */ -/* - * The following symbols are declared in in VC++. - * However, mingw32 doesn't have that header. Let's - * always declare them here, for consistency. - * These are the VC++ values. - */ -#define IDC_STATIC (-1) #define ID_EDIT_COPY 30000