commit 9d7509ae130db43b490a7d808c50d30ab41a362b
parent fd8d0c1e483bc2baecdb0b3b733060778d31b661
Author: Simon Kornblith <simon@simonster.com>
Date: Fri, 10 Feb 2012 01:44:35 -0500
Fix breakage
Diffstat:
1 file changed, 2 insertions(+), 21 deletions(-)
diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js
@@ -193,9 +193,8 @@ Zotero.Integration = new function() {
if(callback) callback(_integrationVersionsOK);
}
- var extMan = Components.classes['@mozilla.org/extensions/manager;1'].
- getService(Components.interfaces.nsIExtensionManager);
- _checkAddons([extMan.getItemForID(id) for each(id in INTEGRATION_PLUGINS)]);
+ Components.utils.import("resource://gre/modules/AddonManager.jsm");
+ AddonManager.getAddonsByIDs(INTEGRATION_PLUGINS, _checkAddons);
}
/**
@@ -533,24 +532,6 @@ Zotero.Integration = new function() {
intervalID = win.setInterval(_X11BringToForeground, 50);
}, false);
}
-
- var dummyPtr = dummy.address();
- if(!XQueryTree(display, w, dummyPtr, dummyPtr, childrenPtr.address(),
- nChildren.address()) || childrenPtr.isNull()) {
- return false;
- }
-
- var nChildrenJS = nChildren.value;
- var children = ctypes.cast(childrenPtr, ctypes.uint32_t.array(nChildrenJS).ptr).contents;
- var foundWindow = false;
- for(var i=0; i<nChildrenJS; i++) {
- foundWindow = _X11FindWindow(display, children.addressOfElement(i).contents,
- searchName);
- if(foundWindow) break;
- }
-
- XFree(children);
- return foundWindow;
}
function _X11FindWindow(display, w, searchName) {