From fed724e99df751457772ce518eff61131a5b09e1 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Fri, 8 Apr 2011 14:34:32 +0000 Subject: [PATCH] don't bother with unnecessary code to activate Firefox on Windows --- chrome/content/zotero/xpcom/integration.js | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index a67abc145d..0cf81e3512 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -580,26 +580,6 @@ Zotero.Integration = new function() { } else { _executeAppleScript('tell application id "'+BUNDLE_IDS[Zotero.appName]+'" to activate'); } - } else if(Zotero.isWin) { - try { - if(!_winUser32) { - Components.utils.import("resource://gre/modules/ctypes.jsm"); - var lib = ctypes.open("user32.dll"); - _winUser32 = new function() { - this.FindWindow = lib.declare("FindWindowW", ctypes.default_abi, ctypes.int32_t, - ctypes.ustring, ctypes.ustring); - this.SetForegroundWindow = lib.declare("SetForegroundWindow", ctypes.default_abi, ctypes.bool, - ctypes.int32_t); - } - } - - var thWnd = _winUser32.FindWindow(Zotero.appName+"MessageWindow", null); - if(thWnd) _winUser32.SetForegroundWindow(thWnd); - } catch(e) { - // Don't throw if we don't succeed - Components.utils.reportError(e); - return; - } } }