mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-21 14:31:25 +02:00
Fix multi-window thingy and stuff.
This commit is contained in:
@@ -634,6 +634,9 @@ var Buffer = Module("Buffer", {
|
||||
| persist.PERSIST_FLAGS_REPLACE_EXISTING_FILES;
|
||||
|
||||
let window = this.topWindow;
|
||||
if (!file.exists())
|
||||
file.create(Ci.nsIFile.NORMAL_FILE_TYPE, octal(666));
|
||||
|
||||
let downloadListener = new window.DownloadListener(window,
|
||||
services.Transfer(uri, File(file).URI, "",
|
||||
null, null, null, persist));
|
||||
|
||||
+10
-7
@@ -199,13 +199,6 @@ overlay.overlayWindow(Object.keys(config.overlays), function _overlay(window) ({
|
||||
this.loaded = {};
|
||||
modules.loaded = this.loaded;
|
||||
|
||||
defineModule.modules.forEach(function defModule(mod) {
|
||||
let names = Set(Object.keys(mod.INIT));
|
||||
if ("init" in mod.INIT)
|
||||
Set.add(names, "init");
|
||||
|
||||
keys(names).forEach(function (name) { self.deferInit(name, mod.INIT, mod); });
|
||||
});
|
||||
this.modules = modules;
|
||||
|
||||
this.scanModules();
|
||||
@@ -310,6 +303,7 @@ overlay.overlayWindow(Object.keys(config.overlays), function _overlay(window) ({
|
||||
|
||||
let className = mod.className || mod.constructor.className;
|
||||
|
||||
if (!Set.has(init, className)) {
|
||||
init[className] = function callee() {
|
||||
function finish() {
|
||||
this.currentDependency = className;
|
||||
@@ -326,12 +320,21 @@ overlay.overlayWindow(Object.keys(config.overlays), function _overlay(window) ({
|
||||
};
|
||||
|
||||
INIT[name].require = function (name) { init[name](); };
|
||||
}
|
||||
},
|
||||
|
||||
scanModules: function scanModules() {
|
||||
let self = this;
|
||||
let { Module, modules } = this.modules;
|
||||
|
||||
defineModule.modules.forEach(function defModule(mod) {
|
||||
let names = Set(Object.keys(mod.INIT));
|
||||
if ("init" in mod.INIT)
|
||||
Set.add(names, "init");
|
||||
|
||||
keys(names).forEach(function (name) { self.deferInit(name, mod.INIT, mod); });
|
||||
});
|
||||
|
||||
Module.list.forEach(function frobModule(mod) {
|
||||
if (!mod.frobbed) {
|
||||
modules.__defineGetter__(mod.className, function () {
|
||||
|
||||
@@ -18,6 +18,7 @@ defineModule("sanitizer", {
|
||||
});
|
||||
|
||||
lazyRequire("messages", ["_"]);
|
||||
lazyRequire("overlay", ["overlay"]);
|
||||
lazyRequire("storage", ["storage"]);
|
||||
lazyRequire("template", ["template"]);
|
||||
|
||||
@@ -179,8 +180,10 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
|
||||
}
|
||||
});
|
||||
|
||||
util.timeout(function () { // Load order issue...
|
||||
|
||||
let (branch = Item.PREFIX + Item.SHUTDOWN_BRANCH) {
|
||||
util.overlayWindow("chrome://browser/content/preferences/sanitize.xul",
|
||||
overlay.overlayWindow("chrome://browser/content/preferences/sanitize.xul",
|
||||
function (win) prefOverlay(branch, true, {
|
||||
append: {
|
||||
SanitizeDialogPane:
|
||||
@@ -202,7 +205,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
|
||||
}));
|
||||
}
|
||||
let (branch = Item.PREFIX + Item.BRANCH) {
|
||||
util.overlayWindow("chrome://browser/content/sanitize.xul",
|
||||
overlay.overlayWindow("chrome://browser/content/sanitize.xul",
|
||||
function (win) prefOverlay(branch, false, {
|
||||
append: {
|
||||
itemList: <>
|
||||
@@ -233,6 +236,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
firstRun: 0,
|
||||
|
||||
Reference in New Issue
Block a user