After having the Makefiles done properly, the pragmas for linking shell32.lib are not required. Further, since, Mozilla defines its own WIN_VER etc. macros to ensure maximum compatibility with Windows 2000 and forward, I think we can remove the Windows version declarations in the windows code. Here is the patch:

changeset: 5168:a11767e89140
branch: minimizetotray
user: Sunil Mohan Adapa <sunil@synovel.com>
date: Fri Feb 19 18:30:09 2010 +0530
summary: Cleanup unneeded Windows declarations

diff --git a/collab/extensions/minimizetotray/source/windows/trayToolkit.h b/collab/extensions/minimizetotray/source/windows/trayToolkit.h
--- a/collab/extensions/minimizetotray/source/windows/trayToolkit.h
+++ b/collab/extensions/minimizetotray/source/windows/trayToolkit.h
@@ -2,12 +2,6 @@
#define trayToolkit_h__



#include "nspr.h"

-

-#ifdef _WIN32_IE

-#undef _WIN32_IE

-#endif

-

-#define _WIN32_IE 0x0600



#include <windows.h>

#include <shellapi.h>

@@ -27,10 +21,6 @@
#define SetWindowLongPtrA SetWindowLongA

#define GetWindowLongPtrW GetWindowLongW

#define SetWindowLongPtrW SetWindowLongW

-#define NOTIFYICONDATAA_V1_SIZE sizeof(NOTIFYICONDATAA)

-#define NOTIFYICONDATAA_V2_SIZE (-1)

-#define NOTIFYICONDATAW_V1_SIZE sizeof(NOTIFYICONDATAW)

-#define NOTIFYICONDATAW_V2_SIZE (-1)

#endif



typedef LONG_PTR (WINAPI *TT_GetWindowLongPtr)(HWND, int);

diff --git a/collab/extensions/minimizetotray/source/windows/trayWin32WindowHider.cpp b/collab/extensions/minimizetotray/source/windows/trayWin32WindowHider.cpp
--- a/collab/extensions/minimizetotray/source/windows/trayWin32WindowHider.cpp
+++ b/collab/extensions/minimizetotray/source/windows/trayWin32WindowHider.cpp
@@ -8,8 +8,6 @@
#include "nsMemory.h"

#include "nsStringAPI.h"

#include "widget/nsIBaseWindow.h"

-

-#pragma comment(lib, "shell32.lib")



const TCHAR* trayWin32WindowHider::S_PROPINST = TEXT(

"_MOOK_TRAY_WINDOWHIDER_INST");

diff --git a/collab/extensions/minimizetotray/source/windows/trayWin32WindowHider.h b/collab/extensions/minimizetotray/source/windows/trayWin32WindowHider.h
--- a/collab/extensions/minimizetotray/source/windows/trayWin32WindowHider.h
+++ b/collab/extensions/minimizetotray/source/windows/trayWin32WindowHider.h
@@ -6,9 +6,6 @@


#ifndef trayWin32WindowHider_h__

#define trayWin32WindowHider_h__

-

-// needed for QueueUserAPC

-#define _WIN32_WINNT 0x0500



#include "trayInterface.h"

#include <windows.h>

diff --git a/collab/extensions/minimizetotray/source/windows/trayWin32WindowIcon.cpp b/collab/extensions/minimizetotray/source/windows/trayWin32WindowIcon.cpp
--- a/collab/extensions/minimizetotray/source/windows/trayWin32WindowIcon.cpp
+++ b/collab/extensions/minimizetotray/source/windows/trayWin32WindowIcon.cpp
@@ -28,8 +28,6 @@


#include "nsIPrefService.h"

#include "nsIPrefBranch2.h"

-

-#pragma comment(lib, "shell32.lib")



const TCHAR* trayWin32WindowIcon::S_PROPINST = TEXT(

"_MOOK_TRAY_WINDOWICON_INST");

diff --git a/collab/extensions/minimizetotray/source/windows/trayWin32WindowIcon.h b/collab/extensions/minimizetotray/source/windows/trayWin32WindowIcon.h
--- a/collab/extensions/minimizetotray/source/windows/trayWin32WindowIcon.h
+++ b/collab/extensions/minimizetotray/source/windows/trayWin32WindowIcon.h
@@ -7,12 +7,6 @@
#ifndef trayWin32WindowIcon_h__

#define trayWin32WindowIcon_h__



-#ifdef _WIN32_IE

-# undef _WIN32_IE

-#endif

-#define _WIN32_IE 0x0600 // We want more features

-// needed for QueueUserAPC

-#define _WIN32_WINNT 0x0500

#include <windows.h>

#include <shellapi.h>