Remove now-pointless cast in create_url_spec().
[privoxy.git] / w32taskbar.c
index b4ff924..0b9ebba 100644 (file)
@@ -1,4 +1,4 @@
-const char w32taskbar_rcs[] = "$Id: w32taskbar.c,v 1.5 2002/03/24 12:03:47 jongfoster Exp $";
+const char w32taskbar_rcs[] = "$Id: w32taskbar.c,v 1.9 2006/07/18 14:48:48 david__schmidt Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/w32taskbar.c,v $
@@ -32,6 +32,23 @@ const char w32taskbar_rcs[] = "$Id: w32taskbar.c,v 1.5 2002/03/24 12:03:47 jongf
  *
  * Revisions   :
  *    $Log: w32taskbar.c,v $
+ *    Revision 1.9  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.7.2.2  2003/03/19 21:27:42  gliptak
+ *    Corrected compilation error/typo
+ *
+ *    Revision 1.7.2.1  2002/11/20 14:39:32  oes
+ *    Applied patch by Mattes Dolak which adds re-creation of the win32 taskbar
+ *    icon on reception of the "TaskbarCreated" window message.
+ *
+ *    Revision 1.7  2002/03/31 17:19:00  jongfoster
+ *    Win32 only: Enabling STRICT to fix a VC++ compile warning.
+ *
+ *    Revision 1.6  2002/03/26 22:57:10  jongfoster
+ *    Web server name should begin www.
+ *
  *    Revision 1.5  2002/03/24 12:03:47  jongfoster
  *    Name change
  *
@@ -55,6 +72,9 @@ const char w32taskbar_rcs[] = "$Id: w32taskbar.c,v 1.5 2002/03/24 12:03:47 jongf
 
 #include <stdio.h>
 
+#ifndef STRICT
+#define STRICT
+#endif
 #include <windows.h>
 
 #include "w32taskbar.h"
@@ -69,6 +89,7 @@ const char w32taskbar_h_rcs[] = W32TASKBAR_H_VERSION;
 
 static HMENU g_hmenuTray;
 static HWND g_hwndTrayX;
+static UINT g_traycreatedmsg;
 
 static LRESULT CALLBACK TrayProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
 
@@ -104,6 +125,9 @@ HWND CreateTrayWindow(HINSTANCE hInstance)
 
    RegisterClass(&wc);
 
+   /* TaskbarCreated is sent to a window when it should re-add its tray icons */
+   g_traycreatedmsg = RegisterWindowMessage("TaskbarCreated");
+
    g_hwndTrayX = CreateWindow(szWndName, szWndName,
       WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
       CW_USEDEFAULT, NULL, NULL, hInstance, NULL );
@@ -264,7 +288,11 @@ LRESULT CALLBACK TrayProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
       return 0;
 
       default:
-         /* DO NOTHING */
+
+         if (msg == g_traycreatedmsg)
+         {
+            TrayAddIcon(g_hwndTrayX, 1, g_hiconApp, "Privoxy");
+         }
          break;
    }