mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-14 20:03:31 +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;
|
| persist.PERSIST_FLAGS_REPLACE_EXISTING_FILES;
|
||||||
|
|
||||||
let window = this.topWindow;
|
let window = this.topWindow;
|
||||||
|
if (!file.exists())
|
||||||
|
file.create(Ci.nsIFile.NORMAL_FILE_TYPE, octal(666));
|
||||||
|
|
||||||
let downloadListener = new window.DownloadListener(window,
|
let downloadListener = new window.DownloadListener(window,
|
||||||
services.Transfer(uri, File(file).URI, "",
|
services.Transfer(uri, File(file).URI, "",
|
||||||
null, null, null, persist));
|
null, null, null, persist));
|
||||||
|
|||||||
@@ -199,13 +199,6 @@ overlay.overlayWindow(Object.keys(config.overlays), function _overlay(window) ({
|
|||||||
this.loaded = {};
|
this.loaded = {};
|
||||||
modules.loaded = 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.modules = modules;
|
||||||
|
|
||||||
this.scanModules();
|
this.scanModules();
|
||||||
@@ -310,6 +303,7 @@ overlay.overlayWindow(Object.keys(config.overlays), function _overlay(window) ({
|
|||||||
|
|
||||||
let className = mod.className || mod.constructor.className;
|
let className = mod.className || mod.constructor.className;
|
||||||
|
|
||||||
|
if (!Set.has(init, className)) {
|
||||||
init[className] = function callee() {
|
init[className] = function callee() {
|
||||||
function finish() {
|
function finish() {
|
||||||
this.currentDependency = className;
|
this.currentDependency = className;
|
||||||
@@ -326,12 +320,21 @@ overlay.overlayWindow(Object.keys(config.overlays), function _overlay(window) ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
INIT[name].require = function (name) { init[name](); };
|
INIT[name].require = function (name) { init[name](); };
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
scanModules: function scanModules() {
|
scanModules: function scanModules() {
|
||||||
let self = this;
|
let self = this;
|
||||||
let { Module, modules } = this.modules;
|
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) {
|
Module.list.forEach(function frobModule(mod) {
|
||||||
if (!mod.frobbed) {
|
if (!mod.frobbed) {
|
||||||
modules.__defineGetter__(mod.className, function () {
|
modules.__defineGetter__(mod.className, function () {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ defineModule("sanitizer", {
|
|||||||
});
|
});
|
||||||
|
|
||||||
lazyRequire("messages", ["_"]);
|
lazyRequire("messages", ["_"]);
|
||||||
|
lazyRequire("overlay", ["overlay"]);
|
||||||
lazyRequire("storage", ["storage"]);
|
lazyRequire("storage", ["storage"]);
|
||||||
lazyRequire("template", ["template"]);
|
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) {
|
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, {
|
function (win) prefOverlay(branch, true, {
|
||||||
append: {
|
append: {
|
||||||
SanitizeDialogPane:
|
SanitizeDialogPane:
|
||||||
@@ -202,7 +205,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
let (branch = Item.PREFIX + Item.BRANCH) {
|
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, {
|
function (win) prefOverlay(branch, false, {
|
||||||
append: {
|
append: {
|
||||||
itemList: <>
|
itemList: <>
|
||||||
@@ -233,6 +236,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
firstRun: 0,
|
firstRun: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user