diff --git a/k-meleon/KMeleon10.sln b/k-meleon/KMeleon10.sln
--- a/k-meleon/KMeleon10.sln
+++ b/k-meleon/KMeleon10.sln
@@ -1,10 +1,12 @@
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.40629.0
+MinimumVisualStudioVersion = 10.0.40219.1
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "k-meleon", "app\KMeleon.vcxproj", "{7BB6C711-139E-C685-6DF2-191FFF772A85}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bmpmenu", "kplugins\bmpmenu\bmpmenu.vcxproj", "{07094943-C44A-4247-83AD-86CE1448130B}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fullscreen", "kplugins\fullscreen\fullscreen.vcxproj", "{E6248B91-1FDD-5213-AE71-98DDB350CFD4}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bookmarks", "kplugins\bookmarks\bookmarks.vcxproj", "{C3975598-71BD-4883-BC8B-238CDDAC570D}"
 EndProject
diff --git a/k-meleon/app/KMeleon.vcxproj b/k-meleon/app/KMeleon.vcxproj
--- a/k-meleon/app/KMeleon.vcxproj
+++ b/k-meleon/app/KMeleon.vcxproj
@@ -98,29 +98,30 @@
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <AdditionalIncludeDirectories>../shared;..\..\xulrunner-sdk\include\nspr;..\..\xulrunner-sdk\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <Optimization>MinSpace</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <WholeProgramOptimization>true</WholeProgramOptimization>
       <StringPooling>true</StringPooling>
       <FunctionLevelLinking>true</FunctionLevelLinking>
-      <PrecompiledHeader>Use</PrecompiledHeader>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
       <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+      <DisableSpecificWarnings>4800;4819;4996</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <TargetMachine>MachineX86</TargetMachine>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
       <HeapReserveSize>0x40000</HeapReserveSize>
       <LargeAddressAware>true</LargeAddressAware>
       <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
-      <AdditionalLibraryDirectories>..\..\xulrunner-sdk\lib_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>..\..\xulrunner-sdk\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
     </Link>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Static MFC|Win32'">
     <ClCompile>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
diff --git a/k-meleon/app/KmAppInfo.cpp b/k-meleon/app/KmAppInfo.cpp
--- a/k-meleon/app/KmAppInfo.cpp
+++ b/k-meleon/app/KmAppInfo.cpp
@@ -209,20 +209,20 @@ NS_IMETHODIMP KmAppInfo::EnsureContentPr
 
 /* readonly attribute PRTime replacedLockTime; */
 NS_IMETHODIMP KmAppInfo::GetReplacedLockTime(PRTime *aReplacedLockTime)
 {
 	return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 /* readonly attribute DOMString lastRunCrashID; */
-NS_IMETHODIMP KmAppInfo::GetLastRunCrashID(nsAString & aLastRunCrashID)
+/*NS_IMETHODIMP KmAppInfo::GetLastRunCrashID(nsAString & aLastRunCrashID)
 {
 	return NS_ERROR_NOT_IMPLEMENTED;
-}
+}*/
 
 NS_IMETHODIMP KmAppInfo::GetBrowserTabsRemoteAutostart(bool *aBrowserTabsRemote)
 {
 	*aBrowserTabsRemote = false;
 	return NS_OK;
 }
 
 /* readonly attribute boolean accessibilityEnabled; */
@@ -368,20 +368,20 @@ NS_IMETHODIMP KmAppInfo::GetRestarting(b
 
 /* readonly attribute boolean wasRestarted; */
 NS_IMETHODIMP KmAppInfo::GetWasRestarted(bool *aWasRestarted)
 {
 	return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 /* readonly attribute boolean restartingTouchEnvironment; */
-NS_IMETHODIMP KmAppInfo::GetRestartingTouchEnvironment(bool *aRestartingTouchEnvironment)
+/*NS_IMETHODIMP KmAppInfo::GetRestartingTouchEnvironment(bool *aRestartingTouchEnvironment)
 {
 	return NS_ERROR_NOT_IMPLEMENTED;
-}
+}*/
 
 /* [implicit_jscontext] jsval getStartupInfo (); */
 NS_IMETHODIMP KmAppInfo::GetStartupInfo(JSContext* cx, JS::MutableHandleValue _retval)
 {
 	return NS_ERROR_NOT_IMPLEMENTED;	
 }
 
 /* attribute boolean interrupted; */
diff --git a/k-meleon/kplugins/bmpmenu/bmpmenu.vcxproj b/k-meleon/kplugins/bmpmenu/bmpmenu.vcxproj
--- a/k-meleon/kplugins/bmpmenu/bmpmenu.vcxproj
+++ b/k-meleon/kplugins/bmpmenu/bmpmenu.vcxproj
@@ -75,16 +75,17 @@
       </PrecompiledHeader>
       <Optimization>MinSpace</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;BMPMENU_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <AdditionalIncludeDirectories>..\..\shared;h:\Program Files (x86)\Visual Leak Detector\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+      <DisableSpecificWarnings>4800;4819;4996</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
       <LargeAddressAware>true</LargeAddressAware>
       <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
diff --git a/k-meleon/kplugins/bookmarks/bookmarks.vcxproj b/k-meleon/kplugins/bookmarks/bookmarks.vcxproj
--- a/k-meleon/kplugins/bookmarks/bookmarks.vcxproj
+++ b/k-meleon/kplugins/bookmarks/bookmarks.vcxproj
@@ -91,16 +91,17 @@
       </PrecompiledHeader>
       <Optimization>MinSpace</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <AdditionalIncludeDirectories>..\..\shared;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+      <DisableSpecificWarnings>4800;4819;4996</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
       <LargeAddressAware>true</LargeAddressAware>
       <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
diff --git a/k-meleon/kplugins/favorites/favorites.vcxproj b/k-meleon/kplugins/favorites/favorites.vcxproj
--- a/k-meleon/kplugins/favorites/favorites.vcxproj
+++ b/k-meleon/kplugins/favorites/favorites.vcxproj
@@ -94,16 +94,17 @@
       </PrecompiledHeader>
       <Optimization>MinSpace</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <AdditionalIncludeDirectories>..\..\shared;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+      <DisableSpecificWarnings>4800;4819;4996</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
       <LargeAddressAware>true</LargeAddressAware>
       <AdditionalDependencies>comctl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
diff --git a/k-meleon/kplugins/fullscreen/fullscreen.vcxproj b/k-meleon/kplugins/fullscreen/fullscreen.vcxproj
--- a/k-meleon/kplugins/fullscreen/fullscreen.vcxproj
+++ b/k-meleon/kplugins/fullscreen/fullscreen.vcxproj
@@ -89,25 +89,26 @@
       </PrecompiledHeader>
       <Optimization>MinSpace</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <AdditionalIncludeDirectories>..\..\..\xulrunner-sdk\include\nspr;..\..\..\xulrunner-sdk\include;..\..\shared;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+      <DisableSpecificWarnings>4800;4819;4996</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
       <LargeAddressAware>true</LargeAddressAware>
       <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
       <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
-      <AdditionalLibraryDirectories>..\..\..\xulrunner-sdk\lib_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>..\..\..\xulrunner-sdk\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalDependencies>nss3.lib;mozjs.lib;xul.lib;mozalloc.lib;xpcomglue_s.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
   </ItemDefinitionGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/k-meleon/kplugins/gestures/gestures.cpp b/k-meleon/kplugins/gestures/gestures.cpp
--- a/k-meleon/kplugins/gestures/gestures.cpp
+++ b/k-meleon/kplugins/gestures/gestures.cpp
@@ -15,38 +15,35 @@
  *   GNU General Public License for more details.
  *
  *   You should have received a copy of the GNU General Public License
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
 #define _WIN32_WINNT 0x0500
-
-#include "mozilla/Char16.h"
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <math.h>
 #include <tchar.h>
-#include <gdiplus.h>
-using namespace Gdiplus;
-#pragma comment(lib, "gdiplus.lib") 
-
-ULONG_PTR  gdiplusToken = NULL;
 
 #define KMELEON_PLUGIN_EXPORTS
+#include "kmeleon_plugin.h"
+#include "../../app/KMeleonConst.h"
+
 #define _Tr(x) kPlugin.kFuncs->Translate(_T(x))
+
 #define PLUGIN_NAME "Mouse Gestures Plugin"
 #define NO_OPTIONS _Tr("This plugin has no user configurable options.")
+
 #define PREF_ "kmeleon.plugins.gestures."
+
+
 #define NOTFOUND -1
 
-#include "kmeleon_plugin.h"
-#include "../../app/KMeleonConst.h"
-#include "strconv.h"
-#include "mozilla.h"
 
 BOOL APIENTRY DllMain (
         HANDLE hModule,
         DWORD ul_reason_for_call,
         LPVOID lpReserved) {
 
   return TRUE;
 }
@@ -55,73 +52,38 @@ LRESULT CALLBACK WndProc (
         HWND hWnd, UINT message,
         WPARAM wParam,
         LPARAM lParam);
 
 void * KMeleonWndProc;
 
 int Init();
 void Create(HWND parent);
-void Destroy(HWND parent);
 void Config(HWND parent);
-void CreateTab(HWND parent, HWND tab);
-void DestroyTab(HWND parent, HWND tab);
 void Quit();
 void DoMenu(HMENU menu, char *param);
 long DoMessage(const char *to, const char *from, const char *subject, long data1, long data2);
 void DoRebar(HWND rebarWnd);
 int DoAccel(char *param);
 
 kmeleonPlugin kPlugin = {
     KMEL_PLUGIN_VER,
     PLUGIN_NAME,
     DoMessage
 };
 
-#include <map>
-template<class T>
-class WinData {
-protected:
-	typedef std::map<HWND, T> S;
-	S s;
-
-public:
-	T& Attach(HWND hWnd) {
-		auto it = s.find(hWnd);
-		if (it != s.end()) return it->second;
-		auto p = s.insert(std::pair<HWND, T>(hWnd, T()));
-		return p.first->second;
-	}
-
-	void Detach(HWND hWnd) {
-		s.erase(hWnd);
-	}
-
-};
-
-WinData<nsCOMPtr<CDomEventListener>> winData;
-
 long DoMessage(const char *to, const char *from, const char *subject, long data1, long data2)
 {
     if (to[0] == '*' || stricmp(to, kPlugin.dllname) == 0) {
         if (stricmp(subject, "Init") == 0) {
             Init();
         }
         else if (strcmp(subject, "Create") == 0) {
             Create((HWND)data1);
         }
-		else if (strcmp(subject, "CreateTab") == 0) {
-			CreateTab((HWND)data1, (HWND)data2);
-		}
-		else if (strcmp(subject, "DestroyTab") == 0) {
-			DestroyTab((HWND)data1, (HWND)data2);
-		}
-		else if (strcmp(subject, "Destroy") == 0) {
-			Destroy((HWND)data1);
-		}
         else if (strcmp(subject, "Config") == 0) {
             Config((HWND)data1);
         }
         else if (strcmp(subject, "Quit") == 0) {
             Quit();
         }
         else if (strcmp(subject, "DoMenu") == 0) {
             DoMenu((HMENU)data1, (char *)data2);
@@ -161,43 +123,25 @@ UINT id_defercapture;
 
 int Init(){
     id_defercapture = kPlugin.kFuncs->GetCommandIDs(1);
     InitDefaultPreferences();
     return true;
 }
 
 void Create(HWND parent){
-    KMeleonWndProc = (void *)GetWindowLong(parent, GWL_WNDPROC);
+    KMeleonWndProc = (void *) GetWindowLong(parent, GWL_WNDPROC);
     SetWindowLong(parent, GWL_WNDPROC, (LONG)WndProc);
-    GdiplusStartupInput gdiplusStartupInput;
-    GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
-}
-
-void CreateTab(HWND hWndParent, HWND hTab) {
-	nsCOMPtr<CDomEventListener>& l = winData.Attach(hWndParent);
-	if (!l) l = new CDomEventListener(hWndParent);
-	l->Init(hTab);
-}
-
-void DestroyTab(HWND hWndParent, HWND hTab) {
-	nsCOMPtr<CDomEventListener>& l = winData.Attach(hWndParent);
-	if (l) l->Done(hTab);
-}
-
-void Destroy(HWND hWnd) {
-	winData.Detach(hWnd);
 }
 
 void Config(HWND parent){
     //MessageBox(parent, NO_OPTIONS, _T(PLUGIN_NAME), 0);
 }
 
 void Quit(){
-    if (gdiplusToken) GdiplusShutdown(gdiplusToken);
 }
 
 void DoMenu(HMENU menu, char *param){
 }
 
 int DoAccel(char *param) {
     return 0;
 }
@@ -266,38 +210,32 @@ DIRECTION findDir(POINT p1, POINT p2) {
             return dx > 0 ? UPRIGHT : UPLEFT;
     }
 
     return BADMOVE;
 }
 
 static UINT  m_captured;
 static UINT  m_defercapture;
-kmeleonPointInfo* m_pInfo = nullptr;
+kmeleonPointInfo* m_pInfo;
 static POINT m_posDown;
-static POINT m_posDraw;
 static SYSTEMTIME m_stDown;
 static int m_virt;
 
 static BOOL m_rocking = FALSE;
 static BOOL m_preventpopup = FALSE;
-static BOOL m_trail = TRUE;
 
 LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam){
     if (message == WM_COMMAND){
         WORD command = LOWORD(wParam);
 
         if (command == id_defercapture) {
-            kPlugin.kFuncs->GetPreference(PREF_BOOL, PREF_"mousetrail", &m_trail, &m_trail);
-            m_pInfo = kPlugin.kFuncs->GetInfoAtClick(hWnd);
-            if (!m_pInfo || (m_captured == WM_LBUTTONDOWN && m_pInfo->isInput))
-                return 0;
             m_captured = m_defercapture;
-            SetCapture(hWnd);
-			
+			m_pInfo = kPlugin.kFuncs->GetInfoAtClick(hWnd);
+			SetCapture(hWnd);
         }
     }
 	else if (m_rocking && ((message == WM_RBUTTONUP) || (message == WM_LBUTTONUP)))
 	{
 		m_preventpopup--;
 		if (!m_preventpopup) {
 			m_rocking = FALSE;
 			//POINT pos;
@@ -330,25 +268,22 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT
                     m_virt |= FSHIFT;
                 if (GetKeyState(VK_CONTROL) < 0)
                     m_virt |= FCONTROL;
                 if (GetKeyState(VK_MENU) < 0)
                     m_virt |= FALT;
 
                 if (mouseMsg == WM_RBUTTONDOWN || m_virt != 0 || mouseMsg == WM_LBUTTONDOWN) {
                     //SetCapture(hWnd);
-                    m_defercapture = mouseMsg;
+                    m_defercapture = m_captured = mouseMsg;
                     GetSystemTime(&m_stDown);
-                    m_posDraw = m_posDown;
-                    HWND targetWnd = WindowFromPoint(m_posDown);
-                    ScreenToClient(targetWnd, &m_posDraw);
                     PostMessage(hWnd, WM_COMMAND, id_defercapture, 0);
-                    //m_pInfo = kPlugin.kFuncs->GetInfoAtClick(hWnd);
-                    //SetCapture(hWnd);
-
+					//m_pInfo = kPlugin.kFuncs->GetInfoAtClick(hWnd);
+					//SetCapture(hWnd);
+                    
                     return MA_ACTIVATE;
                 }
             }
         }
         else
             m_captured = m_defercapture = 0;
     }
     else if (
@@ -356,21 +291,17 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT
              message == WM_MBUTTONDBLCLK || 
              message == WM_RBUTTONDBLCLK){
         ReleaseCapture();
         m_captured = 0;
     }
 	else if (message == WM_CAPTURECHANGED && (HWND)lParam!=hWnd)
 	{
 		ReleaseCapture();
-		HWND targetWnd = WindowFromPoint(m_posDown);
-		ClientToScreen(targetWnd, &m_posDraw);
-		if (m_trail && m_captured == WM_RBUTTONDOWN && (m_posDraw.x != m_posDown.x || m_posDraw.y != m_posDown.y))
-			RedrawWindow(hWnd, NULL, NULL, RDW_INVALIDATE | RDW_ALLCHILDREN);
-		m_captured = 0;
+        m_captured = 0;
 	}
     else if (message == WM_LBUTTONDOWN && m_captured == WM_RBUTTONDOWN ||
     		 message == WM_RBUTTONDOWN && m_captured == WM_LBUTTONDOWN)
     {
         char szPref[100], szTxt[100];
         strcpy(szPref, PREF_);
 		
         if (m_captured == WM_LBUTTONDOWN)
@@ -381,36 +312,33 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT
         INT id = 0;
         if (*szTxt)
            	id = kPlugin.kFuncs->GetID(szTxt);
         PostMessage(hWnd, WM_COMMAND, id, 0L);
         m_rocking = TRUE;
 		m_preventpopup = 2;
 		//m_captured = 0;
     }
-    else if (message == WM_MOUSEMOVE && m_captured == WM_LBUTTONDOWN && !m_rocking) {
+    else if (message == WM_MOUSEMOVE && m_captured == WM_LBUTTONDOWN && m_virt == 0 && !m_rocking) {
     
         POINT m_posMove;
         GetCursorPos(&m_posMove);
-		int allow = 1;
-		kPlugin.kFuncs->GetPreference(PREF_BOOL, PREF_"allow_left", &allow, &allow);
-
-        if ( (abs(m_posMove.x - m_posDown.x) > 1 || abs(m_posMove.y - m_posDown.y) > 1)
-			&& m_virt == 0 || !allow)
-			//&& (!(m_pInfo->link && strlen(m_pInfo->link)) || !allow) )
+        
+        if (abs(m_posMove.x - m_posDown.x) > 1 ||
+            abs(m_posMove.y - m_posDown.y) > 1)
         {
 	        ReleaseCapture();
 	        m_captured = 0;
 			
 			POINT m_posDownClient = m_posDown;
 			ScreenToClient(WindowFromPoint(m_posDown), &m_posDownClient);
 			//SetCursorPos(m_posDown.x, m_posDown.y);
 			//if (!m_pInfo->isInput && !(m_pInfo->link && *m_pInfo->link) && !(m_pInfo->image && *m_pInfo->image))
 			//	PostMessage(WindowFromPoint(m_posDown), WM_LBUTTONUP, wParam, MAKELONG(m_posDownClient.x, m_posDownClient.y));
-			PostMessage(WindowFromPoint(m_posDown), WM_LBUTTONDOWN, wParam, MAKELONG(m_posDownClient.x, m_posDownClient.y));
+			//PostMessage(WindowFromPoint(m_posDown), WM_LBUTTONDOWN, wParam, MAKELONG(m_posDownClient.x, m_posDownClient.y));
 			//SetCursorPos(m_posMove.x, m_posMove.y);
      	}
     }
     else if ((message == WM_LBUTTONUP && m_captured == WM_LBUTTONDOWN ||
               message == WM_MBUTTONUP && m_captured == WM_MBUTTONDOWN ||
               message == WM_RBUTTONUP && m_captured == WM_RBUTTONDOWN)
 			  && !m_rocking)
 	{
@@ -424,17 +352,20 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT
 
         ULONG u1 = m_stDown.wMilliseconds + 1000 * (m_stDown.wSecond + 60*(m_stDown.wMinute + 60*(m_stDown.wHour)));
         ULONG u2 = m_stUp.wMilliseconds + 1000 * (m_stUp.wSecond + 60*(m_stUp.wMinute + 60*(m_stUp.wHour)));
 
         UINT MAXTIME = 750;
         kPlugin.kFuncs->GetPreference(PREF_INT, PREF_"maxtime", &MAXTIME, &MAXTIME);
 
         if ( u2 - u1 > MAXTIME ) {
-			dir = BADMOVE;
+            if ( u2 - u1 > 3*MAXTIME/2 )
+                dir = NOMOVE;
+            else
+                dir = (dir != NOMOVE ? BADMOVE : NOMOVE);
         }
 
         char szTxt[100];
         char szPref[100];
         strcpy(szPref, PREF_);
 
         if (m_virt & FSHIFT)   strcat(szPref, "S");
         if (m_virt & FCONTROL) strcat(szPref, "C");
@@ -461,72 +392,44 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT
             strcpy(szPref, PREF_);
             strcat(szPref, szDir[dir]);
             kPlugin.kFuncs->GetPreference(PREF_STRING, szPref, szTxt, (char*)"");
         }
 
         int id = 0;
         if (*szTxt)
             id = kPlugin.kFuncs->GetID(szTxt);
-		        
+        
 		HWND targetWnd = WindowFromPoint(m_posDown);
 		ScreenToClient(targetWnd, &m_posDown);
 		ScreenToClient(targetWnd, &m_posUp);
-
-		if (m_captured == WM_LBUTTONDOWN && id == 0) { 
+		if (m_captured == WM_LBUTTONDOWN && (id == 0 || m_virt == 0)) {
 			//SendMessage(targetWnd, WM_LBUTTONDOWN, MK_LBUTTON, MAKELONG(m_posDown.x, m_posDown.y));
         	PostMessage(targetWnd, WM_LBUTTONUP, wParam, MAKELONG(m_posUp.x, m_posUp.y));
 		}
         else if (m_rocking)
             m_rocking = FALSE;
-		else if (dir == NOMOVE && m_captured == WM_RBUTTONDOWN && id == 0) {
+		else if (dir == NOMOVE && m_captured == WM_RBUTTONDOWN /*&& m_virt == 0*/ && id <= 0) {
 			//SendMessage(targetWnd, WM_RBUTTONDOWN, wParam, MAKELONG(m_posDown.x, m_posDown.y));
 			PostMessage(targetWnd, WM_RBUTTONUP, wParam, MAKELONG(m_posDown.x, m_posDown.y));
             //PostMessage(GetFocus(), WM_CONTEXTMENU, (WPARAM) hWnd, MAKELONG(m_posUp.x, m_posUp.y));
 		}
-		else if (m_captured == WM_MBUTTONDOWN && id == 0) {
+		else if (m_captured == WM_MBUTTONDOWN && (id == 0 || m_virt == 0)) {
 			//SendMessage(targetWnd, WM_MBUTTONDOWN, MK_LBUTTON, MAKELONG(m_posDown.x, m_posDown.y));
-			PostMessage(targetWnd, WM_MBUTTONUP, wParam, MAKELONG(m_posUp.x, m_posUp.y));
+        	PostMessage(targetWnd, WM_MBUTTONUP, wParam, MAKELONG(m_posUp.x, m_posUp.y));
 		}
-		else if (dir != BADMOVE && id > 0) {
-			if (id == kPlugin.kFuncs->GetID("navSearch")) {
-				int len = kPlugin.kFuncs->GetWindowVar(hWnd, Window_SelectedText, NULL);
-				wchar_t* query = (wchar_t*)malloc(len*sizeof(wchar_t));
-				kPlugin.kFuncs->GetWindowVar(hWnd, Window_SelectedText, query);
-				SendMessage(hWnd, WM_COMMAND, id, (LPARAM)query);
-				free(query);
-			} else
-				PostMessage(hWnd, WM_COMMAND, id, 0);			
-		}
+        else if (dir != BADMOVE && id > 0)
+            PostMessage(hWnd, WM_COMMAND, id, 0L);
 
         ReleaseCapture();
         m_captured = m_defercapture = 0;
-        return 0;
+       // if (dir != BADMOVE)
+            return 0;
     }
 
-	if (m_captured == WM_RBUTTONDOWN && message == WM_MOUSEMOVE && m_trail)
-	{
-		//GDI+ draw
-		HWND targetWnd = WindowFromPoint(m_posDown);
-		POINT newPos;
-		newPos.x = LOWORD(lParam);
-		newPos.y = HIWORD(lParam);
-		ClientToScreen(hWnd, &newPos);
-		int tt = ScreenToClient(targetWnd, &newPos);
-		if (newPos.x > 0 && newPos.y > 0 && newPos.x < 32768 && newPos.y < 32768) {
-			HDC hdc = GetDC(targetWnd);
-			Graphics graphics(hdc);
-			graphics.SetSmoothingMode(SmoothingModeAntiAlias);
-			graphics.SetPixelOffsetMode(Gdiplus::PixelOffsetMode::PixelOffsetModeHighQuality);
-			Pen pen(Color(200, 0, 0, 255), 2);
-			graphics.DrawLine(&pen, m_posDraw.x, m_posDraw.y, newPos.x, newPos.y);
-			m_posDraw = newPos;
-			ReleaseDC(targetWnd, hdc);
-		}
-	}
     return CallWindowProc((WNDPROC)KMeleonWndProc, hWnd, message, wParam, lParam);
 }
 
 extern "C" {
     KMELEON_PLUGIN kmeleonPlugin *GetKmeleonPlugin() {
         return &kPlugin;
     }
 }
diff --git a/k-meleon/kplugins/gestures/gestures.vcxproj b/k-meleon/kplugins/gestures/gestures.vcxproj
--- a/k-meleon/kplugins/gestures/gestures.vcxproj
+++ b/k-meleon/kplugins/gestures/gestures.vcxproj
@@ -86,26 +86,27 @@
       </PrecompiledHeader>
       <Optimization>MinSpace</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;BMPMENU_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <AdditionalIncludeDirectories>..\..\..\xulrunner-sdk\include\nspr;..\..\..\xulrunner-sdk\include;..\..\shared;h:\Program Files (x86)\Visual Leak Detector\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+      <DisableSpecificWarnings>4800;4819;4996</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
       <LargeAddressAware>true</LargeAddressAware>
       <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
       <ProfileGuidedDatabase>$(IntDir)$(TargetName).pgd</ProfileGuidedDatabase>
       <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
-      <AdditionalLibraryDirectories>..\..\..\xulrunner-sdk\lib_$(Configuration);h:\Program Files (x86)\Visual Leak Detector\lib\Win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>..\..\..\xulrunner-sdk\lib;h:\Program Files (x86)\Visual Leak Detector\lib\Win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalDependencies>nss3.lib;mozjs.lib;xul.lib;mozalloc.lib;xpcomglue_s.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
   </ItemDefinitionGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/k-meleon/kplugins/hotlist/hotlist.vcxproj b/k-meleon/kplugins/hotlist/hotlist.vcxproj
--- a/k-meleon/kplugins/hotlist/hotlist.vcxproj
+++ b/k-meleon/kplugins/hotlist/hotlist.vcxproj
@@ -88,16 +88,17 @@
       </PrecompiledHeader>
       <Optimization>MinSpace</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <AdditionalIncludeDirectories>..\..\shared;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+      <DisableSpecificWarnings>4800;4819;4996</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
       <LargeAddressAware>true</LargeAddressAware>
       <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
diff --git a/k-meleon/kplugins/jsbridge/JSBridge.vcxproj b/k-meleon/kplugins/jsbridge/JSBridge.vcxproj
--- a/k-meleon/kplugins/jsbridge/JSBridge.vcxproj
+++ b/k-meleon/kplugins/jsbridge/JSBridge.vcxproj
@@ -88,31 +88,32 @@
       </PrecompiledHeader>
       <Optimization>MinSpace</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <AdditionalIncludeDirectories>$(IntDir);..\..\..\xulrunner-sdk\include\nspr;..\..\..\xulrunner-sdk\include;..\..\shared;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+      <DisableSpecificWarnings>4800;4819;4996</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
       <LargeAddressAware>true</LargeAddressAware>
       <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
       <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
-      <AdditionalLibraryDirectories>..\..\..\xulrunner-sdk\lib_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>..\..\..\xulrunner-sdk\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalDependencies>nss3.lib;xul.lib;mozalloc.lib;mozjs.lib;xpcomglue_s.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
     <PreBuildEvent>
-      <Command>..\..\..\xulrunner-sdk\bin\header.py -I ../../../xulrunner-sdk/idl -o "$(IntDir)nsIJSBridge.h" idl/nsIJSBridge.idl 
-..\..\..\xulrunner-sdk\bin\typelib.py -I ../../../xulrunner-sdk/idl  -o "$(IntDir)jsbridge.xpt" idl/nsIJSBridge.idl </Command>
+      <Command>c:\mozilla-build\python\python ..\..\..\xulrunner-sdk\sdk\bin\header.py -I ../../../xulrunner-sdk/idl -o "$(IntDir)nsIJSBridge.h" idl/nsIJSBridge.idl
+c:\mozilla-build\python\python ..\..\..\xulrunner-sdk\sdk\bin\typelib.py -I ../../../xulrunner-sdk/idl  -o "$(IntDir)jsbridge.xpt" idl/nsIJSBridge.idl</Command>
     </PreBuildEvent>
     <PostBuildEvent>
       <Command>copy "$(IntDir)jsbridge.xpt" "$(OutDir)..\browser\components"</Command>
     </PostBuildEvent>
   </ItemDefinitionGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
diff --git a/k-meleon/kplugins/jsbridge/genidl.cmd b/k-meleon/kplugins/jsbridge/genidl.cmd
--- a/k-meleon/kplugins/jsbridge/genidl.cmd
+++ b/k-meleon/kplugins/jsbridge/genidl.cmd
@@ -1,2 +1,2 @@
-@..\..\xulrunner-sdk\bin\header.py -I ../../xulrunner-sdk/idl -o nsIJSBridge.h nsIJSBridge.idl 
-@..\..\xulrunner-sdk\bin\typelib.py -I ../../xulrunner-sdk/idl  -o jsbridge.xpt nsIJSBridge.idl 
+@c:\mozilla-build\python\python ..\..\..\xulrunner-sdk\sdk\bin\header.py -I ../../../xulrunner-sdk/idl -o nsIJSBridge.h idl/nsIJSBridge.idl 
+@c:\mozilla-build\python\python ..\..\..\xulrunner-sdk\sdk\bin\typelib.py -I ../../../xulrunner-sdk/idl  -o jsbridge.xpt idl/nsIJSBridge.idl 
diff --git a/k-meleon/kplugins/jsbridge/jsbridge.xpt b/k-meleon/kplugins/jsbridge/jsbridge.xpt
index d11dfe07503fa7278aca94fe2b774f33b401c9fa..c7550cced1bd7f624de42eda7d6abcd93314bdfe
GIT binary patch
literal 1779
zc${@qO^6&t6n@>kJ*$%_5d~#(38Lf>f(Ic%M6_piT*u6G5A(x@K$7X{E@zva=^p!M
z7f)&9ToPiKtT~uH1|lJ+Kn_6(l0c5Rg<K+f$VI`6<nI)S?^RW|<1*XLOnvWr?|rZ8
zbyXd0R;)&`^Uavmz5Z*(lA^+HfWi|1cn?5{Q<(QCb6N4co`LT!sDt(K(hryJ{N5>Q
zK1r6O>+m+;Q{+tPJ26M|>m4+oA$3Z+ew>r{%MN+Zk-8^ce|~cAuYX!^z46=iKVE@-
zySErFZ;xE&r`vo3<R;R0Yff8U?ojVBfVxX~w7cL(wI!>u;`wf{K}I_nkApCdU~N>Z
z1f!AdyPqe%6MKOVfiD?U5N$uGrJJCng~>E60Nkb=dpPXd&KiV?pNAb&C(~Y$hhT{n
z)-Q*_M#MrYB1^BL?2y5L#T~mJQKp(=<{72;J>>yR)ulr3BETl-M5JQk)ph1$Mu>SN
zhPjziUzP}iASOAD<nD7hLJyT5S0em~@FG|JZ`I)2BL*&u9IzdS4Z)GTH?jvz{-Z7_
zD0`KwH@TLwFGug^=m6<!0)NQa&k%j2q&Ksg<s^==!L!oNDs$GDn~$y++5O=x$cmp=
zdQ%~JQAwww%$7p^ChoG576o@L=WcLLG|}o~m)5aSh`(%?L(j$HZ5B6}pX47?+R$SC
z#2dOCS3+jTOwL>wS-d0-*X;xWG9f`pw%90G&(b^>rG3<kB3kn@iz_3y?nN<%4RBx~
z+R*jG8LQ2MY7V9&6hfJ0@GoVJnNL~<Zd)uRHv)+#VTk)hZaE|bifDRNmH8MaCYYP`
zz;>I%WZ+?e)nJ1!y-_v0C-JUo80L~NnpU&h6tHI2Yi3o__3m=b6u4b&8ZDz^wZLjt
z&6B3pY8Z8it1AMOjmnYbmeobs%+WE*+kH7zsaseH_rW{3i`BOm@as?UKx*PRg1TQv
zn|{-b`GD^bLLckI(u<q3D7Y_lk^O)6xQ3C1NkLev3qmhb3{_s0<5McX4y1LOSEje8
z3g&!%hF?t!DiW6#^C_1mo3KE?Ecgl+qNp2Gq9pLI8qX++n0qtDACO1y$@>A+?1U5k
zo3LEKi+mD-&=wV(z%GH`oWbvAE71;82a0@Rcynrpbh_5GijJKJ&D24|;g}8!IDDmp
ajzgmJ`}JE9c~(SjiO8Qs<j*?nN&f`}Tf{{G

diff --git a/k-meleon/kplugins/jsbridge/nsIJSBridge.h b/k-meleon/kplugins/jsbridge/nsIJSBridge.h
--- a/k-meleon/kplugins/jsbridge/nsIJSBridge.h
+++ b/k-meleon/kplugins/jsbridge/nsIJSBridge.h
@@ -1,10 +1,10 @@
 /*
- * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIJSBridge.idl
+ * DO NOT EDIT.  THIS FILE IS GENERATED FROM idl/nsIJSBridge.idl
  */
 
 #ifndef __gen_nsIJSBridge_h__
 #define __gen_nsIJSBridge_h__
 
 
 #ifndef __gen_nsISupports_h__
 #include "nsISupports.h"
@@ -49,25 +49,25 @@ class NS_NO_VTABLE kmICommandFunction : 
   NS_IMETHOD OnCommand(nsIDOMWindow *win, uint32_t mode, const char * arg) = 0;
 
 };
 
   NS_DEFINE_STATIC_IID_ACCESSOR(kmICommandFunction, KMICOMMANDFUNCTION_IID)
 
 /* Use this macro when declaring classes that implement this interface. */
 #define NS_DECL_KMICOMMANDFUNCTION \
-  NS_IMETHOD OnCommand(nsIDOMWindow *win, uint32_t mode, const char * arg); 
+  NS_IMETHOD OnCommand(nsIDOMWindow *win, uint32_t mode, const char * arg) override; 
 
 /* Use this macro to declare functions that forward the behavior of this interface to another object. */
 #define NS_FORWARD_KMICOMMANDFUNCTION(_to) \
-  NS_IMETHOD OnCommand(nsIDOMWindow *win, uint32_t mode, const char * arg) { return _to OnCommand(win, mode, arg); } 
+  NS_IMETHOD OnCommand(nsIDOMWindow *win, uint32_t mode, const char * arg) override { return _to OnCommand(win, mode, arg); } 
 
 /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
 #define NS_FORWARD_SAFE_KMICOMMANDFUNCTION(_to) \
-  NS_IMETHOD OnCommand(nsIDOMWindow *win, uint32_t mode, const char * arg) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnCommand(win, mode, arg); } 
+  NS_IMETHOD OnCommand(nsIDOMWindow *win, uint32_t mode, const char * arg) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnCommand(win, mode, arg); } 
 
 #if 0
 /* Use the code below as a template for the implementation class for this interface. */
 
 /* Header file */
 class kmCommandFunction : public kmICommandFunction
 {
 public:
@@ -79,17 +79,17 @@ public:
 private:
   ~kmCommandFunction();
 
 protected:
   /* additional members */
 };
 
 /* Implementation file */
-NS_IMPL_ISUPPORTS1(kmCommandFunction, kmICommandFunction)
+NS_IMPL_ISUPPORTS(kmCommandFunction, kmICommandFunction)
 
 kmCommandFunction::kmCommandFunction()
 {
   /* member initializers and constructor code */
 }
 
 kmCommandFunction::~kmCommandFunction()
 {
@@ -122,25 +122,25 @@ class NS_NO_VTABLE kmICallback : public 
   NS_IMETHOD Run(const char * arg, bool *_retval) = 0;
 
 };
 
   NS_DEFINE_STATIC_IID_ACCESSOR(kmICallback, KMICALLBACK_IID)
 
 /* Use this macro when declaring classes that implement this interface. */
 #define NS_DECL_KMICALLBACK \
-  NS_IMETHOD Run(const char * arg, bool *_retval); 
+  NS_IMETHOD Run(const char * arg, bool *_retval) override; 
 
 /* Use this macro to declare functions that forward the behavior of this interface to another object. */
 #define NS_FORWARD_KMICALLBACK(_to) \
-  NS_IMETHOD Run(const char * arg, bool *_retval) { return _to Run(arg, _retval); } 
+  NS_IMETHOD Run(const char * arg, bool *_retval) override { return _to Run(arg, _retval); } 
 
 /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
 #define NS_FORWARD_SAFE_KMICALLBACK(_to) \
-  NS_IMETHOD Run(const char * arg, bool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Run(arg, _retval); } 
+  NS_IMETHOD Run(const char * arg, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Run(arg, _retval); } 
 
 #if 0
 /* Use the code below as a template for the implementation class for this interface. */
 
 /* Header file */
 class kmCallback : public kmICallback
 {
 public:
@@ -152,17 +152,17 @@ public:
 private:
   ~kmCallback();
 
 protected:
   /* additional members */
 };
 
 /* Implementation file */
-NS_IMPL_ISUPPORTS1(kmCallback, kmICallback)
+NS_IMPL_ISUPPORTS(kmCallback, kmICallback)
 
 kmCallback::kmCallback()
 {
   /* member initializers and constructor code */
 }
 
 kmCallback::~kmCallback()
 {
@@ -198,28 +198,28 @@ class NS_NO_VTABLE kmIWindow : public ns
   NS_IMETHOD GetTabs(uint32_t *length, nsIWebBrowser * **list) = 0;
 
 };
 
   NS_DEFINE_STATIC_IID_ACCESSOR(kmIWindow, KMIWINDOW_IID)
 
 /* Use this macro when declaring classes that implement this interface. */
 #define NS_DECL_KMIWINDOW \
-  NS_IMETHOD GetHandle(void **aHandle); \
-  NS_IMETHOD GetTabs(uint32_t *length, nsIWebBrowser * **list); 
+  NS_IMETHOD GetHandle(void **aHandle) override; \
+  NS_IMETHOD GetTabs(uint32_t *length, nsIWebBrowser * **list) override; 
 
 /* Use this macro to declare functions that forward the behavior of this interface to another object. */
 #define NS_FORWARD_KMIWINDOW(_to) \
-  NS_IMETHOD GetHandle(void **aHandle) { return _to GetHandle(aHandle); } \
-  NS_IMETHOD GetTabs(uint32_t *length, nsIWebBrowser * **list) { return _to GetTabs(length, list); } 
+  NS_IMETHOD GetHandle(void **aHandle) override { return _to GetHandle(aHandle); } \
+  NS_IMETHOD GetTabs(uint32_t *length, nsIWebBrowser * **list) override { return _to GetTabs(length, list); } 
 
 /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
 #define NS_FORWARD_SAFE_KMIWINDOW(_to) \
-  NS_IMETHOD GetHandle(void **aHandle) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHandle(aHandle); } \
-  NS_IMETHOD GetTabs(uint32_t *length, nsIWebBrowser * **list) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTabs(length, list); } 
+  NS_IMETHOD GetHandle(void **aHandle) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHandle(aHandle); } \
+  NS_IMETHOD GetTabs(uint32_t *length, nsIWebBrowser * **list) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTabs(length, list); } 
 
 #if 0
 /* Use the code below as a template for the implementation class for this interface. */
 
 /* Header file */
 class kmWindow : public kmIWindow
 {
 public:
@@ -231,17 +231,17 @@ public:
 private:
   ~kmWindow();
 
 protected:
   /* additional members */
 };
 
 /* Implementation file */
-NS_IMPL_ISUPPORTS1(kmWindow, kmIWindow)
+NS_IMPL_ISUPPORTS(kmWindow, kmIWindow)
 
 kmWindow::kmWindow()
 {
   /* member initializers and constructor code */
 }
 
 kmWindow::~kmWindow()
 {
@@ -259,16 +259,113 @@ NS_IMETHODIMP kmWindow::GetTabs(uint32_t
 {
     return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 /* End of implementation class template. */
 #endif
 
 
+/* starting interface:    kmITab */
+#define KMITAB_IID_STR "83910267-7670-4493-99c1-dd540a036ef6"
+
+#define KMITAB_IID \
+  {0x83910267, 0x7670, 0x4493, \
+    { 0x99, 0xc1, 0xdd, 0x54, 0x0a, 0x03, 0x6e, 0xf6 }}
+
+class NS_NO_VTABLE kmITab : public nsISupports {
+ public: 
+
+  NS_DECLARE_STATIC_IID_ACCESSOR(KMITAB_IID)
+
+  /* readonly attribute voidPtr handle; */
+  NS_IMETHOD GetHandle(void **aHandle) = 0;
+
+  /* readonly attribute nsIWebBrowser browser; */
+  NS_IMETHOD GetBrowser(nsIWebBrowser * *aBrowser) = 0;
+
+  /* readonly attribute nsIDOMEventTarget root; */
+  NS_IMETHOD GetRoot(nsIDOMEventTarget * *aRoot) = 0;
+
+};
+
+  NS_DEFINE_STATIC_IID_ACCESSOR(kmITab, KMITAB_IID)
+
+/* Use this macro when declaring classes that implement this interface. */
+#define NS_DECL_KMITAB \
+  NS_IMETHOD GetHandle(void **aHandle) override; \
+  NS_IMETHOD GetBrowser(nsIWebBrowser * *aBrowser) override; \
+  NS_IMETHOD GetRoot(nsIDOMEventTarget * *aRoot) override; 
+
+/* Use this macro to declare functions that forward the behavior of this interface to another object. */
+#define NS_FORWARD_KMITAB(_to) \
+  NS_IMETHOD GetHandle(void **aHandle) override { return _to GetHandle(aHandle); } \
+  NS_IMETHOD GetBrowser(nsIWebBrowser * *aBrowser) override { return _to GetBrowser(aBrowser); } \
+  NS_IMETHOD GetRoot(nsIDOMEventTarget * *aRoot) override { return _to GetRoot(aRoot); } 
+
+/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
+#define NS_FORWARD_SAFE_KMITAB(_to) \
+  NS_IMETHOD GetHandle(void **aHandle) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHandle(aHandle); } \
+  NS_IMETHOD GetBrowser(nsIWebBrowser * *aBrowser) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBrowser(aBrowser); } \
+  NS_IMETHOD GetRoot(nsIDOMEventTarget * *aRoot) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRoot(aRoot); } 
+
+#if 0
+/* Use the code below as a template for the implementation class for this interface. */
+
+/* Header file */
+class kmTab : public kmITab
+{
+public:
+  NS_DECL_ISUPPORTS
+  NS_DECL_KMITAB
+
+  kmTab();
+
+private:
+  ~kmTab();
+
+protected:
+  /* additional members */
+};
+
+/* Implementation file */
+NS_IMPL_ISUPPORTS(kmTab, kmITab)
+
+kmTab::kmTab()
+{
+  /* member initializers and constructor code */
+}
+
+kmTab::~kmTab()
+{
+  /* destructor code */
+}
+
+/* readonly attribute voidPtr handle; */
+NS_IMETHODIMP kmTab::GetHandle(void **aHandle)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* readonly attribute nsIWebBrowser browser; */
+NS_IMETHODIMP kmTab::GetBrowser(nsIWebBrowser * *aBrowser)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* readonly attribute nsIDOMEventTarget root; */
+NS_IMETHODIMP kmTab::GetRoot(nsIDOMEventTarget * *aRoot)
+{
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* End of implementation class template. */
+#endif
+
+
 /* starting interface:    kmICommand */
 #define KMICOMMAND_IID_STR "3d8ce8f0-5214-11db-b0de-0800200c9a65"
 
 #define KMICOMMAND_IID \
   {0x3d8ce8f0, 0x5214, 0x11db, \
     { 0xb0, 0xde, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x65 }}
 
 class NS_NO_VTABLE kmICommand : public nsISupports {
@@ -293,40 +390,40 @@ class NS_NO_VTABLE kmICommand : public n
   NS_IMETHOD SetImage(const nsACString & aImage) = 0;
 
 };
 
   NS_DEFINE_STATIC_IID_ACCESSOR(kmICommand, KMICOMMAND_IID)
 
 /* Use this macro when declaring classes that implement this interface. */
 #define NS_DECL_KMICOMMAND \
-  NS_IMETHOD GetName(nsACString & aName); \
-  NS_IMETHOD GetDesc(nsACString & aDesc); \
-  NS_IMETHOD GetAccel(nsACString & aAccel); \
-  NS_IMETHOD GetCommand(kmICommandFunction * *aCommand); \
-  NS_IMETHOD GetImage(nsACString & aImage); \
-  NS_IMETHOD SetImage(const nsACString & aImage); 
+  NS_IMETHOD GetName(nsACString & aName) override; \
+  NS_IMETHOD GetDesc(nsACString & aDesc) override; \
+  NS_IMETHOD GetAccel(nsACString & aAccel) override; \
+  NS_IMETHOD GetCommand(kmICommandFunction * *aCommand) override; \
+  NS_IMETHOD GetImage(nsACString & aImage) override; \
+  NS_IMETHOD SetImage(const nsACString & aImage) override; 
 
 /* Use this macro to declare functions that forward the behavior of this interface to another object. */
 #define NS_FORWARD_KMICOMMAND(_to) \
-  NS_IMETHOD GetName(nsACString & aName) { return _to GetName(aName); } \
-  NS_IMETHOD GetDesc(nsACString & aDesc) { return _to GetDesc(aDesc); } \
-  NS_IMETHOD GetAccel(nsACString & aAccel) { return _to GetAccel(aAccel); } \
-  NS_IMETHOD GetCommand(kmICommandFunction * *aCommand) { return _to GetCommand(aCommand); } \
-  NS_IMETHOD GetImage(nsACString & aImage) { return _to GetImage(aImage); } \
-  NS_IMETHOD SetImage(const nsACString & aImage) { return _to SetImage(aImage); } 
+  NS_IMETHOD GetName(nsACString & aName) override { return _to GetName(aName); } \
+  NS_IMETHOD GetDesc(nsACString & aDesc) override { return _to GetDesc(aDesc); } \
+  NS_IMETHOD GetAccel(nsACString & aAccel) override { return _to GetAccel(aAccel); } \
+  NS_IMETHOD GetCommand(kmICommandFunction * *aCommand) override { return _to GetCommand(aCommand); } \
+  NS_IMETHOD GetImage(nsACString & aImage) override { return _to GetImage(aImage); } \
+  NS_IMETHOD SetImage(const nsACString & aImage) override { return _to SetImage(aImage); } 
 
 /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
 #define NS_FORWARD_SAFE_KMICOMMAND(_to) \
-  NS_IMETHOD GetName(nsACString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
-  NS_IMETHOD GetDesc(nsACString & aDesc) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDesc(aDesc); } \
-  NS_IMETHOD GetAccel(nsACString & aAccel) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccel(aAccel); } \
-  NS_IMETHOD GetCommand(kmICommandFunction * *aCommand) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCommand(aCommand); } \
-  NS_IMETHOD GetImage(nsACString & aImage) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImage(aImage); } \
-  NS_IMETHOD SetImage(const nsACString & aImage) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetImage(aImage); } 
+  NS_IMETHOD GetName(nsACString & aName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
+  NS_IMETHOD GetDesc(nsACString & aDesc) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDesc(aDesc); } \
+  NS_IMETHOD GetAccel(nsACString & aAccel) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccel(aAccel); } \
+  NS_IMETHOD GetCommand(kmICommandFunction * *aCommand) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCommand(aCommand); } \
+  NS_IMETHOD GetImage(nsACString & aImage) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImage(aImage); } \
+  NS_IMETHOD SetImage(const nsACString & aImage) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetImage(aImage); } 
 
 #if 0
 /* Use the code below as a template for the implementation class for this interface. */
 
 /* Header file */
 class kmCommand : public kmICommand
 {
 public:
@@ -338,17 +435,17 @@ public:
 private:
   ~kmCommand();
 
 protected:
   /* additional members */
 };
 
 /* Implementation file */
-NS_IMPL_ISUPPORTS1(kmCommand, kmICommand)
+NS_IMPL_ISUPPORTS(kmCommand, kmICommand)
 
 kmCommand::kmCommand()
 {
   /* member initializers and constructor code */
 }
 
 kmCommand::~kmCommand()
 {
@@ -418,40 +515,40 @@ class NS_NO_VTABLE kmIButton : public ns
   NS_IMETHOD SetDisabled(bool aDisabled) = 0;
 
 };
 
   NS_DEFINE_STATIC_IID_ACCESSOR(kmIButton, KMIBUTTON_IID)
 
 /* Use this macro when declaring classes that implement this interface. */
 #define NS_DECL_KMIBUTTON \
-  NS_IMETHOD GetImage(char * *aImage); \
-  NS_IMETHOD SetImage(const char * aImage); \
-  NS_IMETHOD GetChecked(bool *aChecked); \
-  NS_IMETHOD SetChecked(bool aChecked); \
-  NS_IMETHOD GetDisabled(bool *aDisabled); \
-  NS_IMETHOD SetDisabled(bool aDisabled); 
+  NS_IMETHOD GetImage(char * *aImage) override; \
+  NS_IMETHOD SetImage(const char * aImage) override; \
+  NS_IMETHOD GetChecked(bool *aChecked) override; \
+  NS_IMETHOD SetChecked(bool aChecked) override; \
+  NS_IMETHOD GetDisabled(bool *aDisabled) override; \
+  NS_IMETHOD SetDisabled(bool aDisabled) override; 
 
 /* Use this macro to declare functions that forward the behavior of this interface to another object. */
 #define NS_FORWARD_KMIBUTTON(_to) \
-  NS_IMETHOD GetImage(char * *aImage) { return _to GetImage(aImage); } \
-  NS_IMETHOD SetImage(const char * aImage) { return _to SetImage(aImage); } \
-  NS_IMETHOD GetChecked(bool *aChecked) { return _to GetChecked(aChecked); } \
-  NS_IMETHOD SetChecked(bool aChecked) { return _to SetChecked(aChecked); } \
-  NS_IMETHOD GetDisabled(bool *aDisabled) { return _to GetDisabled(aDisabled); } \
-  NS_IMETHOD SetDisabled(bool aDisabled) { return _to SetDisabled(aDisabled); } 
+  NS_IMETHOD GetImage(char * *aImage) override { return _to GetImage(aImage); } \
+  NS_IMETHOD SetImage(const char * aImage) override { return _to SetImage(aImage); } \
+  NS_IMETHOD GetChecked(bool *aChecked) override { return _to GetChecked(aChecked); } \
+  NS_IMETHOD SetChecked(bool aChecked) override { return _to SetChecked(aChecked); } \
+  NS_IMETHOD GetDisabled(bool *aDisabled) override { return _to GetDisabled(aDisabled); } \
+  NS_IMETHOD SetDisabled(bool aDisabled) override { return _to SetDisabled(aDisabled); } 
 
 /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
 #define NS_FORWARD_SAFE_KMIBUTTON(_to) \
-  NS_IMETHOD GetImage(char * *aImage) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImage(aImage); } \
-  NS_IMETHOD SetImage(const char * aImage) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetImage(aImage); } \
-  NS_IMETHOD GetChecked(bool *aChecked) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChecked(aChecked); } \
-  NS_IMETHOD SetChecked(bool aChecked) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChecked(aChecked); } \
-  NS_IMETHOD GetDisabled(bool *aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisabled(aDisabled); } \
-  NS_IMETHOD SetDisabled(bool aDisabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisabled(aDisabled); } 
+  NS_IMETHOD GetImage(char * *aImage) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImage(aImage); } \
+  NS_IMETHOD SetImage(const char * aImage) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetImage(aImage); } \
+  NS_IMETHOD GetChecked(bool *aChecked) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChecked(aChecked); } \
+  NS_IMETHOD SetChecked(bool aChecked) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChecked(aChecked); } \
+  NS_IMETHOD GetDisabled(bool *aDisabled) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisabled(aDisabled); } \
+  NS_IMETHOD SetDisabled(bool aDisabled) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDisabled(aDisabled); } 
 
 #if 0
 /* Use the code below as a template for the implementation class for this interface. */
 
 /* Header file */
 class kmButton : public kmIButton
 {
 public:
@@ -463,17 +560,17 @@ public:
 private:
   ~kmButton();
 
 protected:
   /* additional members */
 };
 
 /* Implementation file */
-NS_IMPL_ISUPPORTS1(kmButton, kmIButton)
+NS_IMPL_ISUPPORTS(kmButton, kmIButton)
 
 kmButton::kmButton()
 {
   /* member initializers and constructor code */
 }
 
 kmButton::~kmButton()
 {
@@ -613,94 +710,94 @@ class NS_NO_VTABLE nsIJSBridge : public 
   NS_IMETHOD ShowMenu(const char * name, bool sendCommand, int32_t *_retval) = 0;
 
 };
 
   NS_DEFINE_STATIC_IID_ACCESSOR(nsIJSBridge, NS_IJSBRIDGE_IID)
 
 /* Use this macro when declaring classes that implement this interface. */
 #define NS_DECL_NSIJSBRIDGE \
-  NS_IMETHOD SetMenuCallback(const char * menu, const char * label, kmICommandFunction *command, const char * before); \
-  NS_IMETHOD SetMenu(const char * menu, uint16_t type, const char * label, const char * command, const char * before); \
-  NS_IMETHOD RebuildMenu(const char * menu); \
-  NS_IMETHOD CreateButton(const char * cmd, const char * menu, const char * tooltip, const char * label, kmIButton * *_retval); \
-  NS_IMETHOD CreateCallbackButton(kmICommandFunction *command, const char * menu, const char * tooltip, const char * label, kmIButton * *_retval); \
-  NS_IMETHOD AddToolbar(const char * toolbar, uint32_t width, uint32_t height); \
-  NS_IMETHOD AddButton(const char * toolbar, const char * command, const char * menu, const char * tooltip); \
-  NS_IMETHOD RemoveButton(const char * toolbar, const char * command); \
-  NS_IMETHOD Id(nsIDOMWindow *window, const char * id); \
-  NS_IMETHOD SendMessage(const char * plugin, const char * to, const char * from, const char * data1, int32_t *_retval); \
-  NS_IMETHOD GetCmdList(uint32_t *length, kmICommand * **list); \
-  NS_IMETHOD RegisterCmd(const char * name, const char * desc, kmICommandFunction *command, JS::HandleValue icon, kmICallback *enabled, kmICallback *checked, JSContext* cx, int32_t *_retval); \
-  NS_IMETHOD UnregisterCmd(const char * name); \
-  NS_IMETHOD SetCmdIcon(const char * name, JS::HandleValue icon, JSContext* cx); \
-  NS_IMETHOD SetButtonIcon(const char * toolbar, const char * command, JS::HandleValue icon, JSContext* cx); \
-  NS_IMETHOD SetAccel(const char * key, const char * command); \
-  NS_IMETHOD Open(const char * url, uint16_t state, nsIWebBrowser * *_retval); \
-  NS_IMETHOD GetActiveBrowser(nsIWebBrowser * *_retval); \
-  NS_IMETHOD GetCurrentWindow(kmIWindow * *_retval); \
-  NS_IMETHOD GetWindows(uint32_t *length, kmIWindow * **list); \
-  NS_IMETHOD AddListener(nsIObserver *listener); \
-  NS_IMETHOD RemoveListener(nsIObserver *listener); \
-  NS_IMETHOD LoadPlugin(const char * path); \
-  NS_IMETHOD ShowMenu(const char * name, bool sendCommand, int32_t *_retval); 
+  NS_IMETHOD SetMenuCallback(const char * menu, const char * label, kmICommandFunction *command, const char * before) override; \
+  NS_IMETHOD SetMenu(const char * menu, uint16_t type, const char * label, const char * command, const char * before) override; \
+  NS_IMETHOD RebuildMenu(const char * menu) override; \
+  NS_IMETHOD CreateButton(const char * cmd, const char * menu, const char * tooltip, const char * label, kmIButton * *_retval) override; \
+  NS_IMETHOD CreateCallbackButton(kmICommandFunction *command, const char * menu, const char * tooltip, const char * label, kmIButton * *_retval) override; \
+  NS_IMETHOD AddToolbar(const char * toolbar, uint32_t width, uint32_t height) override; \
+  NS_IMETHOD AddButton(const char * toolbar, const char * command, const char * menu, const char * tooltip) override; \
+  NS_IMETHOD RemoveButton(const char * toolbar, const char * command) override; \
+  NS_IMETHOD Id(nsIDOMWindow *window, const char * id) override; \
+  NS_IMETHOD SendMessage(const char * plugin, const char * to, const char * from, const char * data1, int32_t *_retval) override; \
+  NS_IMETHOD GetCmdList(uint32_t *length, kmICommand * **list) override; \
+  NS_IMETHOD RegisterCmd(const char * name, const char * desc, kmICommandFunction *command, JS::HandleValue icon, kmICallback *enabled, kmICallback *checked, JSContext* cx, int32_t *_retval) override; \
+  NS_IMETHOD UnregisterCmd(const char * name) override; \
+  NS_IMETHOD SetCmdIcon(const char * name, JS::HandleValue icon, JSContext* cx) override; \
+  NS_IMETHOD SetButtonIcon(const char * toolbar, const char * command, JS::HandleValue icon, JSContext* cx) override; \
+  NS_IMETHOD SetAccel(const char * key, const char * command) override; \
+  NS_IMETHOD Open(const char * url, uint16_t state, nsIWebBrowser * *_retval) override; \
+  NS_IMETHOD GetActiveBrowser(nsIWebBrowser * *_retval) override; \
+  NS_IMETHOD GetCurrentWindow(kmIWindow * *_retval) override; \
+  NS_IMETHOD GetWindows(uint32_t *length, kmIWindow * **list) override; \
+  NS_IMETHOD AddListener(nsIObserver *listener) override; \
+  NS_IMETHOD RemoveListener(nsIObserver *listener) override; \
+  NS_IMETHOD LoadPlugin(const char * path) override; \
+  NS_IMETHOD ShowMenu(const char * name, bool sendCommand, int32_t *_retval) override; 
 
 /* Use this macro to declare functions that forward the behavior of this interface to another object. */
 #define NS_FORWARD_NSIJSBRIDGE(_to) \
-  NS_IMETHOD SetMenuCallback(const char * menu, const char * label, kmICommandFunction *command, const char * before) { return _to SetMenuCallback(menu, label, command, before); } \
-  NS_IMETHOD SetMenu(const char * menu, uint16_t type, const char * label, const char * command, const char * before) { return _to SetMenu(menu, type, label, command, before); } \
-  NS_IMETHOD RebuildMenu(const char * menu) { return _to RebuildMenu(menu); } \
-  NS_IMETHOD CreateButton(const char * cmd, const char * menu, const char * tooltip, const char * label, kmIButton * *_retval) { return _to CreateButton(cmd, menu, tooltip, label, _retval); } \
-  NS_IMETHOD CreateCallbackButton(kmICommandFunction *command, const char * menu, const char * tooltip, const char * label, kmIButton * *_retval) { return _to CreateCallbackButton(command, menu, tooltip, label, _retval); } \
-  NS_IMETHOD AddToolbar(const char * toolbar, uint32_t width, uint32_t height) { return _to AddToolbar(toolbar, width, height); } \
-  NS_IMETHOD AddButton(const char * toolbar, const char * command, const char * menu, const char * tooltip) { return _to AddButton(toolbar, command, menu, tooltip); } \
-  NS_IMETHOD RemoveButton(const char * toolbar, const char * command) { return _to RemoveButton(toolbar, command); } \
-  NS_IMETHOD Id(nsIDOMWindow *window, const char * id) { return _to Id(window, id); } \
-  NS_IMETHOD SendMessage(const char * plugin, const char * to, const char * from, const char * data1, int32_t *_retval) { return _to SendMessage(plugin, to, from, data1, _retval); } \
-  NS_IMETHOD GetCmdList(uint32_t *length, kmICommand * **list) { return _to GetCmdList(length, list); } \
-  NS_IMETHOD RegisterCmd(const char * name, const char * desc, kmICommandFunction *command, JS::HandleValue icon, kmICallback *enabled, kmICallback *checked, JSContext* cx, int32_t *_retval) { return _to RegisterCmd(name, desc, command, icon, enabled, checked, cx, _retval); } \
-  NS_IMETHOD UnregisterCmd(const char * name) { return _to UnregisterCmd(name); } \
-  NS_IMETHOD SetCmdIcon(const char * name, JS::HandleValue icon, JSContext* cx) { return _to SetCmdIcon(name, icon, cx); } \
-  NS_IMETHOD SetButtonIcon(const char * toolbar, const char * command, JS::HandleValue icon, JSContext* cx) { return _to SetButtonIcon(toolbar, command, icon, cx); } \
-  NS_IMETHOD SetAccel(const char * key, const char * command) { return _to SetAccel(key, command); } \
-  NS_IMETHOD Open(const char * url, uint16_t state, nsIWebBrowser * *_retval) { return _to Open(url, state, _retval); } \
-  NS_IMETHOD GetActiveBrowser(nsIWebBrowser * *_retval) { return _to GetActiveBrowser(_retval); } \
-  NS_IMETHOD GetCurrentWindow(kmIWindow * *_retval) { return _to GetCurrentWindow(_retval); } \
-  NS_IMETHOD GetWindows(uint32_t *length, kmIWindow * **list) { return _to GetWindows(length, list); } \
-  NS_IMETHOD AddListener(nsIObserver *listener) { return _to AddListener(listener); } \
-  NS_IMETHOD RemoveListener(nsIObserver *listener) { return _to RemoveListener(listener); } \
-  NS_IMETHOD LoadPlugin(const char * path) { return _to LoadPlugin(path); } \
-  NS_IMETHOD ShowMenu(const char * name, bool sendCommand, int32_t *_retval) { return _to ShowMenu(name, sendCommand, _retval); } 
+  NS_IMETHOD SetMenuCallback(const char * menu, const char * label, kmICommandFunction *command, const char * before) override { return _to SetMenuCallback(menu, label, command, before); } \
+  NS_IMETHOD SetMenu(const char * menu, uint16_t type, const char * label, const char * command, const char * before) override { return _to SetMenu(menu, type, label, command, before); } \
+  NS_IMETHOD RebuildMenu(const char * menu) override { return _to RebuildMenu(menu); } \
+  NS_IMETHOD CreateButton(const char * cmd, const char * menu, const char * tooltip, const char * label, kmIButton * *_retval) override { return _to CreateButton(cmd, menu, tooltip, label, _retval); } \
+  NS_IMETHOD CreateCallbackButton(kmICommandFunction *command, const char * menu, const char * tooltip, const char * label, kmIButton * *_retval) override { return _to CreateCallbackButton(command, menu, tooltip, label, _retval); } \
+  NS_IMETHOD AddToolbar(const char * toolbar, uint32_t width, uint32_t height) override { return _to AddToolbar(toolbar, width, height); } \
+  NS_IMETHOD AddButton(const char * toolbar, const char * command, const char * menu, const char * tooltip) override { return _to AddButton(toolbar, command, menu, tooltip); } \
+  NS_IMETHOD RemoveButton(const char * toolbar, const char * command) override { return _to RemoveButton(toolbar, command); } \
+  NS_IMETHOD Id(nsIDOMWindow *window, const char * id) override { return _to Id(window, id); } \
+  NS_IMETHOD SendMessage(const char * plugin, const char * to, const char * from, const char * data1, int32_t *_retval) override { return _to SendMessage(plugin, to, from, data1, _retval); } \
+  NS_IMETHOD GetCmdList(uint32_t *length, kmICommand * **list) override { return _to GetCmdList(length, list); } \
+  NS_IMETHOD RegisterCmd(const char * name, const char * desc, kmICommandFunction *command, JS::HandleValue icon, kmICallback *enabled, kmICallback *checked, JSContext* cx, int32_t *_retval) override { return _to RegisterCmd(name, desc, command, icon, enabled, checked, cx, _retval); } \
+  NS_IMETHOD UnregisterCmd(const char * name) override { return _to UnregisterCmd(name); } \
+  NS_IMETHOD SetCmdIcon(const char * name, JS::HandleValue icon, JSContext* cx) override { return _to SetCmdIcon(name, icon, cx); } \
+  NS_IMETHOD SetButtonIcon(const char * toolbar, const char * command, JS::HandleValue icon, JSContext* cx) override { return _to SetButtonIcon(toolbar, command, icon, cx); } \
+  NS_IMETHOD SetAccel(const char * key, const char * command) override { return _to SetAccel(key, command); } \
+  NS_IMETHOD Open(const char * url, uint16_t state, nsIWebBrowser * *_retval) override { return _to Open(url, state, _retval); } \
+  NS_IMETHOD GetActiveBrowser(nsIWebBrowser * *_retval) override { return _to GetActiveBrowser(_retval); } \
+  NS_IMETHOD GetCurrentWindow(kmIWindow * *_retval) override { return _to GetCurrentWindow(_retval); } \
+  NS_IMETHOD GetWindows(uint32_t *length, kmIWindow * **list) override { return _to GetWindows(length, list); } \
+  NS_IMETHOD AddListener(nsIObserver *listener) override { return _to AddListener(listener); } \
+  NS_IMETHOD RemoveListener(nsIObserver *listener) override { return _to RemoveListener(listener); } \
+  NS_IMETHOD LoadPlugin(const char * path) override { return _to LoadPlugin(path); } \
+  NS_IMETHOD ShowMenu(const char * name, bool sendCommand, int32_t *_retval) override { return _to ShowMenu(name, sendCommand, _retval); } 
 
 /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
 #define NS_FORWARD_SAFE_NSIJSBRIDGE(_to) \
-  NS_IMETHOD SetMenuCallback(const char * menu, const char * label, kmICommandFunction *command, const char * before) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMenuCallback(menu, label, command, before); } \
-  NS_IMETHOD SetMenu(const char * menu, uint16_t type, const char * label, const char * command, const char * before) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMenu(menu, type, label, command, before); } \
-  NS_IMETHOD RebuildMenu(const char * menu) { return !_to ? NS_ERROR_NULL_POINTER : _to->RebuildMenu(menu); } \
-  NS_IMETHOD CreateButton(const char * cmd, const char * menu, const char * tooltip, const char * label, kmIButton * *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateButton(cmd, menu, tooltip, label, _retval); } \
-  NS_IMETHOD CreateCallbackButton(kmICommandFunction *command, const char * menu, const char * tooltip, const char * label, kmIButton * *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateCallbackButton(command, menu, tooltip, label, _retval); } \
-  NS_IMETHOD AddToolbar(const char * toolbar, uint32_t width, uint32_t height) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddToolbar(toolbar, width, height); } \
-  NS_IMETHOD AddButton(const char * toolbar, const char * command, const char * menu, const char * tooltip) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddButton(toolbar, command, menu, tooltip); } \
-  NS_IMETHOD RemoveButton(const char * toolbar, const char * command) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveButton(toolbar, command); } \
-  NS_IMETHOD Id(nsIDOMWindow *window, const char * id) { return !_to ? NS_ERROR_NULL_POINTER : _to->Id(window, id); } \
-  NS_IMETHOD SendMessage(const char * plugin, const char * to, const char * from, const char * data1, int32_t *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SendMessage(plugin, to, from, data1, _retval); } \
-  NS_IMETHOD GetCmdList(uint32_t *length, kmICommand * **list) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCmdList(length, list); } \
-  NS_IMETHOD RegisterCmd(const char * name, const char * desc, kmICommandFunction *command, JS::HandleValue icon, kmICallback *enabled, kmICallback *checked, JSContext* cx, int32_t *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterCmd(name, desc, command, icon, enabled, checked, cx, _retval); } \
-  NS_IMETHOD UnregisterCmd(const char * name) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterCmd(name); } \
-  NS_IMETHOD SetCmdIcon(const char * name, JS::HandleValue icon, JSContext* cx) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCmdIcon(name, icon, cx); } \
-  NS_IMETHOD SetButtonIcon(const char * toolbar, const char * command, JS::HandleValue icon, JSContext* cx) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetButtonIcon(toolbar, command, icon, cx); } \
-  NS_IMETHOD SetAccel(const char * key, const char * command) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAccel(key, command); } \
-  NS_IMETHOD Open(const char * url, uint16_t state, nsIWebBrowser * *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Open(url, state, _retval); } \
-  NS_IMETHOD GetActiveBrowser(nsIWebBrowser * *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetActiveBrowser(_retval); } \
-  NS_IMETHOD GetCurrentWindow(kmIWindow * *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentWindow(_retval); } \
-  NS_IMETHOD GetWindows(uint32_t *length, kmIWindow * **list) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWindows(length, list); } \
-  NS_IMETHOD AddListener(nsIObserver *listener) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddListener(listener); } \
-  NS_IMETHOD RemoveListener(nsIObserver *listener) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveListener(listener); } \
-  NS_IMETHOD LoadPlugin(const char * path) { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadPlugin(path); } \
-  NS_IMETHOD ShowMenu(const char * name, bool sendCommand, int32_t *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ShowMenu(name, sendCommand, _retval); } 
+  NS_IMETHOD SetMenuCallback(const char * menu, const char * label, kmICommandFunction *command, const char * before) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMenuCallback(menu, label, command, before); } \
+  NS_IMETHOD SetMenu(const char * menu, uint16_t type, const char * label, const char * command, const char * before) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMenu(menu, type, label, command, before); } \
+  NS_IMETHOD RebuildMenu(const char * menu) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RebuildMenu(menu); } \
+  NS_IMETHOD CreateButton(const char * cmd, const char * menu, const char * tooltip, const char * label, kmIButton * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateButton(cmd, menu, tooltip, label, _retval); } \
+  NS_IMETHOD CreateCallbackButton(kmICommandFunction *command, const char * menu, const char * tooltip, const char * label, kmIButton * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateCallbackButton(command, menu, tooltip, label, _retval); } \
+  NS_IMETHOD AddToolbar(const char * toolbar, uint32_t width, uint32_t height) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddToolbar(toolbar, width, height); } \
+  NS_IMETHOD AddButton(const char * toolbar, const char * command, const char * menu, const char * tooltip) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddButton(toolbar, command, menu, tooltip); } \
+  NS_IMETHOD RemoveButton(const char * toolbar, const char * command) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveButton(toolbar, command); } \
+  NS_IMETHOD Id(nsIDOMWindow *window, const char * id) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Id(window, id); } \
+  NS_IMETHOD SendMessage(const char * plugin, const char * to, const char * from, const char * data1, int32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SendMessage(plugin, to, from, data1, _retval); } \
+  NS_IMETHOD GetCmdList(uint32_t *length, kmICommand * **list) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCmdList(length, list); } \
+  NS_IMETHOD RegisterCmd(const char * name, const char * desc, kmICommandFunction *command, JS::HandleValue icon, kmICallback *enabled, kmICallback *checked, JSContext* cx, int32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterCmd(name, desc, command, icon, enabled, checked, cx, _retval); } \
+  NS_IMETHOD UnregisterCmd(const char * name) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterCmd(name); } \
+  NS_IMETHOD SetCmdIcon(const char * name, JS::HandleValue icon, JSContext* cx) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCmdIcon(name, icon, cx); } \
+  NS_IMETHOD SetButtonIcon(const char * toolbar, const char * command, JS::HandleValue icon, JSContext* cx) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetButtonIcon(toolbar, command, icon, cx); } \
+  NS_IMETHOD SetAccel(const char * key, const char * command) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAccel(key, command); } \
+  NS_IMETHOD Open(const char * url, uint16_t state, nsIWebBrowser * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Open(url, state, _retval); } \
+  NS_IMETHOD GetActiveBrowser(nsIWebBrowser * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetActiveBrowser(_retval); } \
+  NS_IMETHOD GetCurrentWindow(kmIWindow * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentWindow(_retval); } \
+  NS_IMETHOD GetWindows(uint32_t *length, kmIWindow * **list) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWindows(length, list); } \
+  NS_IMETHOD AddListener(nsIObserver *listener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddListener(listener); } \
+  NS_IMETHOD RemoveListener(nsIObserver *listener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveListener(listener); } \
+  NS_IMETHOD LoadPlugin(const char * path) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadPlugin(path); } \
+  NS_IMETHOD ShowMenu(const char * name, bool sendCommand, int32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ShowMenu(name, sendCommand, _retval); } 
 
 #if 0
 /* Use the code below as a template for the implementation class for this interface. */
 
 /* Header file */
 class nsJSBridge : public nsIJSBridge
 {
 public:
@@ -712,17 +809,17 @@ public:
 private:
   ~nsJSBridge();
 
 protected:
   /* additional members */
 };
 
 /* Implementation file */
-NS_IMPL_ISUPPORTS1(nsJSBridge, nsIJSBridge)
+NS_IMPL_ISUPPORTS(nsJSBridge, nsIJSBridge)
 
 nsJSBridge::nsJSBridge()
 {
   /* member initializers and constructor code */
 }
 
 nsJSBridge::~nsJSBridge()
 {
diff --git a/k-meleon/kplugins/login/login.vcxproj b/k-meleon/kplugins/login/login.vcxproj
--- a/k-meleon/kplugins/login/login.vcxproj
+++ b/k-meleon/kplugins/login/login.vcxproj
@@ -88,31 +88,32 @@
       </PrecompiledHeader>
       <Optimization>MinSpace</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <AdditionalIncludeDirectories>$(IntDir);..\..\..\xulrunner-sdk\include\nspr;..\..\..\xulrunner-sdk\include;..\..\shared;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+      <DisableSpecificWarnings>4800;4819;4996</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
       <LargeAddressAware>true</LargeAddressAware>
       <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
       <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
-      <AdditionalLibraryDirectories>..\..\..\xulrunner-sdk\lib_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>..\..\..\xulrunner-sdk\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalDependencies>mozjs.lib;xul.lib;mozalloc.lib;nss3.lib;xpcomglue_s.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
     <PreBuildEvent>
-      <Command>..\..\..\xulrunner-sdk\bin\header.py -I ../../../xulrunner-sdk/idl -o "$(IntDir)kmIHelper.h" idl/kmIHelper.idl
-..\..\..\xulrunner-sdk\bin\typelib.py -I ../../../xulrunner-sdk/idl  -o "$(IntDir)kmHelper.xpt" idl/kmIHelper.idl</Command>
+      <Command>c:\mozilla-build\python\python ..\..\..\xulrunner-sdk\sdk\bin\header.py -I ../../../xulrunner-sdk/idl -o "$(IntDir)kmIHelper.h" idl/kmIHelper.idl
+c:\mozilla-build\python\python ..\..\..\xulrunner-sdk\sdk\bin\typelib.py -I ../../../xulrunner-sdk/idl  -o "$(IntDir)kmHelper.xpt" idl/kmIHelper.idl</Command>
     </PreBuildEvent>
     <PostBuildEvent>
       <Command>copy "$(IntDir)kmHelper.xpt" "$(OutDir)..\browser\components"</Command>
     </PostBuildEvent>
   </ItemDefinitionGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
diff --git a/k-meleon/kplugins/macros2/macros.vcxproj b/k-meleon/kplugins/macros2/macros.vcxproj
--- a/k-meleon/kplugins/macros2/macros.vcxproj
+++ b/k-meleon/kplugins/macros2/macros.vcxproj
@@ -75,16 +75,17 @@
       </PrecompiledHeader>
       <Optimization>MinSpace</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;BMPMENU_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <AdditionalIncludeDirectories>..\..\shared;h:\Program Files (x86)\Visual Leak Detector\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+      <DisableSpecificWarnings>4800;4819;4996</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
       <LargeAddressAware>true</LargeAddressAware>
       <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
diff --git a/k-meleon/kplugins/privacy/privacy.vcxproj b/k-meleon/kplugins/privacy/privacy.vcxproj
--- a/k-meleon/kplugins/privacy/privacy.vcxproj
+++ b/k-meleon/kplugins/privacy/privacy.vcxproj
@@ -83,25 +83,26 @@
       </PrecompiledHeader>
       <Optimization>MinSpace</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <AdditionalIncludeDirectories>..\..\..\xulrunner-sdk\include\nspr;..\..\..\xulrunner-sdk\include;..\..\shared;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+      <DisableSpecificWarnings>4800;4819;4996</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
       <LargeAddressAware>true</LargeAddressAware>
       <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
       <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
-      <AdditionalLibraryDirectories>..\..\..\xulrunner-sdk\lib_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>..\..\..\xulrunner-sdk\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalDependencies>mozjs.lib;nss3.lib;xul.lib;mozalloc.lib;xpcomglue_s.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
   </ItemDefinitionGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/k-meleon/kplugins/rebar_menu/rebarmenu.vcxproj b/k-meleon/kplugins/rebar_menu/rebarmenu.vcxproj
--- a/k-meleon/kplugins/rebar_menu/rebarmenu.vcxproj
+++ b/k-meleon/kplugins/rebar_menu/rebarmenu.vcxproj
@@ -75,16 +75,17 @@
       </PrecompiledHeader>
       <Optimization>MinSpace</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;BMPMENU_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <AdditionalIncludeDirectories>..\..\shared;h:\Program Files (x86)\Visual Leak Detector\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+      <DisableSpecificWarnings>4800;4819;4996</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
       <LargeAddressAware>true</LargeAddressAware>
       <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
diff --git a/k-meleon/kplugins/sessions/sessions.vcxproj b/k-meleon/kplugins/sessions/sessions.vcxproj
--- a/k-meleon/kplugins/sessions/sessions.vcxproj
+++ b/k-meleon/kplugins/sessions/sessions.vcxproj
@@ -75,16 +75,17 @@
       </PrecompiledHeader>
       <Optimization>MinSpace</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;BMPMENU_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <AdditionalIncludeDirectories>..\..\shared;h:\Program Files (x86)\Visual Leak Detector\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+      <DisableSpecificWarnings>4800;4819;4996</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
       <LargeAddressAware>true</LargeAddressAware>
       <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
diff --git a/k-meleon/kplugins/spellcheck/spellcheck.vcxproj b/k-meleon/kplugins/spellcheck/spellcheck.vcxproj
--- a/k-meleon/kplugins/spellcheck/spellcheck.vcxproj
+++ b/k-meleon/kplugins/spellcheck/spellcheck.vcxproj
@@ -80,25 +80,26 @@
       </PrecompiledHeader>
       <Optimization>MinSpace</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <AdditionalIncludeDirectories>..\..\..\xulrunner-sdk\include\nspr;..\..\..\xulrunner-sdk\include;..\..\shared;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+      <DisableSpecificWarnings>4800;4819;4996</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
       <LargeAddressAware>true</LargeAddressAware>
       <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
       <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
-      <AdditionalLibraryDirectories>..\..\..\xulrunner-sdk\lib_$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>..\..\..\xulrunner-sdk\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <AdditionalDependencies>nss3.lib;mozjs.lib;xul.lib;mozalloc.lib;xpcomglue_s.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
   </ItemDefinitionGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
 </Project>
\ No newline at end of file
diff --git a/k-meleon/kplugins/toolbars/toolbars.vcxproj b/k-meleon/kplugins/toolbars/toolbars.vcxproj
--- a/k-meleon/kplugins/toolbars/toolbars.vcxproj
+++ b/k-meleon/kplugins/toolbars/toolbars.vcxproj
@@ -76,16 +76,17 @@
       </PrecompiledHeader>
       <Optimization>MinSpace</Optimization>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;BMPMENU_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <AdditionalIncludeDirectories>..\..\shared;h:\Program Files (x86)\Visual Leak Detector\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
+      <DisableSpecificWarnings>4800;4819;4996</DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
       <LargeAddressAware>true</LargeAddressAware>
       <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
