- "Show Privoxy Window" now a toggle
authoroes <oes@users.sourceforge.net>
Wed, 21 Aug 2002 17:59:06 +0000 (17:59 +0000)
committeroes <oes@users.sourceforge.net>
Wed, 21 Aug 2002 17:59:06 +0000 (17:59 +0000)
 - Temp kludge to let user and default action file be edited through win32 GUI (FR 592080)

w32log.c
w32res.h

index ada06b2..98eee37 100644 (file)
--- a/w32log.c
+++ b/w32log.c
@@ -1,7 +1,7 @@
-const char w32log_rcs[] = "$Id: w32log.c,v 1.24 2002/03/31 17:19:00 jongfoster Exp $";
+const char w32log_rcs[] = "$Id: w32log.c,v 1.25 2002/04/04 00:36:36 gliptak Exp $";
 /*********************************************************************
  *
- * File        :  $Source: /cvsroot/ijbswa/current/w32log.c,v $
+ * File        :  $Source: /cvsroot/ijbswa//current/Attic/w32log.c,v $
  *
  * Purpose     :  Functions for creating and destroying the log window,
  *                ouputting strings, processing messages and so on.
@@ -32,6 +32,9 @@ const char w32log_rcs[] = "$Id: w32log.c,v 1.24 2002/03/31 17:19:00 jongfoster E
  *
  * Revisions   :
  *    $Log: w32log.c,v $
+ *    Revision 1.25  2002/04/04 00:36:36  gliptak
+ *    always use pcre for matching
+ *
  *    Revision 1.24  2002/03/31 17:19:00  jongfoster
  *    Win32 only: Enabling STRICT to fix a VC++ compile warning.
  *
@@ -221,6 +224,9 @@ const char w32log_h_rcs[] = W32LOG_H_VERSION;
 /* Indicates whether task bar shows activity animation */
 BOOL g_bShowActivityAnimation = 1;
 
+/* Indicates whether the log window is shown */
+BOOL g_bShowLogWindow = 1;
+
 /* Indicates if the log window appears on the task bar */
 BOOL g_bShowOnTaskBar = 0;
 
@@ -248,7 +254,8 @@ int g_nFontSize = DEFAULT_LOG_FONT_SIZE;
 
 /* FIXME: this is a kludge */
 
-const char * g_actions_file = NULL;
+const char * g_default_actions_file = NULL;
+const char * g_user_actions_file = NULL;
 const char * g_re_filterfile = NULL;
 #ifdef FEATURE_TRUST
 const char * g_trustfile = NULL;
@@ -951,6 +958,7 @@ void ShowLogWindow(BOOL bShow)
    {
       SetForegroundWindow(g_hwndLogFrame);
       SetWindowPos(g_hwndLogFrame, HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE);
+      
    }
    else if (g_bShowOnTaskBar)
    {
@@ -960,7 +968,6 @@ void ShowLogWindow(BOOL bShow)
    {
       ShowWindow(g_hwndLogFrame, SW_HIDE);
    }
-
 }
 
 
@@ -1050,8 +1057,10 @@ void OnLogCommand(int nCommand)
 {
    switch (nCommand)
    {
-      case ID_SHOWWINDOW:
-         ShowLogWindow(TRUE);
+      case ID_TOGGLE_SHOWWINDOW:
+         g_bShowLogWindow = !g_bShowLogWindow;
+
+         ShowLogWindow(g_bShowLogWindow);
          break;
 
       case ID_FILE_EXIT:
@@ -1105,8 +1114,12 @@ void OnLogCommand(int nCommand)
          EditFile(configfile);
          break;
 
-      case ID_TOOLS_EDITACTIONS:
-         EditFile(g_actions_file);
+      case ID_TOOLS_EDITDEFAULTACTIONS:
+         EditFile(g_default_actions_file);
+         break;
+
+      case ID_TOOLS_EDITUSERACTIONS:
+         EditFile(g_user_actions_file);
          break;
 
       case ID_TOOLS_EDITFILTERS:
@@ -1163,7 +1176,8 @@ void OnLogCommand(int nCommand)
 void OnLogInitMenu(HMENU hmenu)
 {
    /* Only enable editors if there is a file to edit */
-   EnableMenuItem(hmenu, ID_TOOLS_EDITACTIONS, MF_BYCOMMAND | (g_actions_file ? MF_ENABLED : MF_GRAYED));
+   EnableMenuItem(hmenu, ID_TOOLS_EDITDEFAULTACTIONS, MF_BYCOMMAND | (g_default_actions_file ? MF_ENABLED : MF_GRAYED));
+   EnableMenuItem(hmenu, ID_TOOLS_EDITUSERACTIONS, MF_BYCOMMAND | (g_user_actions_file ? MF_ENABLED : MF_GRAYED));
    EnableMenuItem(hmenu, ID_TOOLS_EDITFILTERS, MF_BYCOMMAND | (g_re_filterfile ? MF_ENABLED : MF_GRAYED));
 #ifdef FEATURE_TRUST
    EnableMenuItem(hmenu, ID_TOOLS_EDITTRUST, MF_BYCOMMAND | (g_trustfile ? MF_ENABLED : MF_GRAYED));
@@ -1178,6 +1192,7 @@ void OnLogInitMenu(HMENU hmenu)
    /* by haroon - menu item for Enable toggle on/off */
    CheckMenuItem(hmenu, ID_TOGGLE_ENABLED, MF_BYCOMMAND | (g_bToggleIJB ? MF_CHECKED : MF_UNCHECKED));
 #endif /* def FEATURE_TOGGLE */
+   CheckMenuItem(hmenu, ID_TOGGLE_SHOWWINDOW, MF_BYCOMMAND | (g_bShowLogWindow ? MF_CHECKED : MF_UNCHECKED));
 
 }
 
index 62308cf..2624afa 100644 (file)
--- 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.12 2002/03/24 12:07:36 jongfoster Exp $"
+#define W32RES_H_VERSION "$Id: w32res.h,v 1.13 2002/03/26 22:57:10 jongfoster Exp $"
 /*********************************************************************
  *
- * File        :  $Source: /cvsroot/ijbswa/current/w32res.h,v $
+ * File        :  $Source: /cvsroot/ijbswa//current/Attic/w32res.h,v $
  *
  * Purpose     :  Identifiers for Windows GUI resources.
  *
@@ -34,6 +34,9 @@
  *
  * Revisions   :
  *    $Log: w32res.h,v $
+ *    Revision 1.13  2002/03/26 22:57:10  jongfoster
+ *    Web server name should begin www.
+ *
  *    Revision 1.12  2002/03/24 12:07:36  jongfoster
  *    Consistern name for filters file
  *
 #define IDI_ANIMATED7                     207
 #define IDI_ANIMATED8                     208
 
-#define ID_SHOWWINDOW                     4000
+#define ID_TOGGLE_SHOWWINDOW              4000
 #define ID_HELP_ABOUT                     4001
 #define ID_FILE_EXIT                      4002
 #define ID_VIEW_CLEARLOG                  4003
 
 /* Break these out so they are easier to extend, but keep consecutive */
 #define ID_TOOLS_EDITCONFIG               5000
-#define ID_TOOLS_EDITACTIONS              5001
-#define ID_TOOLS_EDITFILTERS              5002
+#define ID_TOOLS_EDITDEFAULTACTIONS       5001
+#define ID_TOOLS_EDITUSERACTIONS          5002
+#define ID_TOOLS_EDITFILTERS              5003
 
 #ifdef FEATURE_TRUST
-#define ID_TOOLS_EDITTRUST                5003
+#define ID_TOOLS_EDITTRUST                5004
 #endif /* def FEATURE_TRUST */
 
 /*