diff --git a/lib/core/overlay.js b/lib/core/overlay.js index 001f99d..17c1a61 100644 --- a/lib/core/overlay.js +++ b/lib/core/overlay.js @@ -32,7 +32,7 @@ * * ***** END LICENSE BLOCK ***** */ -let {storage} = require("simple-storage"); +let {storage} = require("sdk/simple-storage"); let {Shortcut} = require("core/shortcut"); let {serialize, unserialize} = require("util/serialization"); diff --git a/lib/prefs/prefpane.js b/lib/prefs/prefpane.js index 3d43947..16a2563 100644 --- a/lib/prefs/prefpane.js +++ b/lib/prefs/prefpane.js @@ -32,7 +32,9 @@ * * ***** END LICENSE BLOCK ***** */ +let self = require("sdk/self"); let {Keys} = require("core/key"); +let winUtils = require("sdk/deprecated/window-utils"); let {TreeView} = require("prefs/treeview"); let {Overlays} = require("core/overlay"); let {PreferenceTree} = require("prefs/tree"); @@ -47,13 +49,12 @@ let delegate = { onUntrack: function () {} }; -let winUtils = require("window-utils"); let windowTracker = new winUtils.WindowTracker(delegate); let PreferencePane = function (window) { this.window = window; - this._createStylesheet(require("self").data.url("prefs.css")); + this._createStylesheet(self.data.url("prefs.css")); this.element = this._createElement("prefpane"); this.element.setAttribute("id", "paneShortcuts"); @@ -61,25 +62,24 @@ let PreferencePane = function (window) { this.element.appendChild(this._createElement("preferences")); - this.prefwindow = window.document.documentElement; + let prefwindow = window.document.documentElement; + this.prefwindow = prefwindow; this.prefwindow.addPane(this.element); window.sizeToContent(); window.centerWindowOnScreen(); - let self = this; - let onSelect = function () { - if (self.element.selected) - self.show(); + if (this.element.selected) + this.show(); else - self.hide(); - }; + this.hide(); + }.bind(this); window.addEventListener("select", function (event) { - if (self.prefwindow == event.target) + if (prefwindow == event.target) window.setTimeout(onSelect, 0); - }, false); + }.bind(this), false); } PreferencePane.prototype = { diff --git a/lib/util/windows.js b/lib/util/windows.js index 987a22f..96419f3 100644 --- a/lib/util/windows.js +++ b/lib/util/windows.js @@ -35,7 +35,7 @@ const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; const WINDOW_TYPE = "navigator:browser"; -let winUtils = require("window-utils"); +let winUtils = require("sdk/deprecated/window-utils"); let windowIterator = winUtils.windowIterator; let listeners = [];