Fix breakage

This commit is contained in:
Simon Kornblith 2012-02-10 01:44:35 -05:00
parent fd8d0c1e48
commit 9d7509ae13

View file

@ -193,9 +193,8 @@ Zotero.Integration = new function() {
if(callback) callback(_integrationVersionsOK); if(callback) callback(_integrationVersionsOK);
} }
var extMan = Components.classes['@mozilla.org/extensions/manager;1']. Components.utils.import("resource://gre/modules/AddonManager.jsm");
getService(Components.interfaces.nsIExtensionManager); AddonManager.getAddonsByIDs(INTEGRATION_PLUGINS, _checkAddons);
_checkAddons([extMan.getItemForID(id) for each(id in INTEGRATION_PLUGINS)]);
} }
/** /**
@ -533,24 +532,6 @@ Zotero.Integration = new function() {
intervalID = win.setInterval(_X11BringToForeground, 50); intervalID = win.setInterval(_X11BringToForeground, 50);
}, false); }, 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) { function _X11FindWindow(display, w, searchName) {