1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-09 15:25:46 +01:00

Merge default.

--HG--
branch : key-processing
This commit is contained in:
Kris Maglione
2011-01-25 16:20:22 -05:00
11 changed files with 42 additions and 263 deletions

View File

@@ -169,8 +169,12 @@ function endModule() {
function require(obj, name, from) {
try {
if (arguments.length === 1)
[obj, name] = [{}, obj];
defineModule.loadLog.push((from || "require") + ": loading " + name + " into " + obj.NAME);
JSMLoader.load(name + ".jsm", obj);
return obj;
}
catch (e) {
defineModule.dump("loading " + String.quote(name + ".jsm") + "\n");

View File

@@ -8,6 +8,7 @@
try {
let global = this;
Components.utils.import("resource://dactyl/bootstrap.jsm");
defineModule("config", {
exports: ["ConfigBase", "Config", "config"],
@@ -54,7 +55,7 @@ var ConfigBase = Class("ConfigBase", {
addon: Class.memoize(function () {
let addon = services.fuel.storage.get("dactyl.bootstrap", {}).addon;
if (!addon)
addon = AddonManager.getAddonByID(this.addonID);
addon = require("addons").AddonManager.getAddonByID(this.addonID);
return addon;
}),

View File

@@ -145,10 +145,10 @@ var Highlights = Module("Highlight", {
let highlight = this.highlight[key] || this._create(false, [key]);
let extends = extend || highlight.extend;
let bases = extend || highlight.extend;
if (append) {
newStyle = Styles.append(highlight.value || "", newStyle);
extends = highlight.extends.concat(extends);
bases = highlight.extends.concat(bases);
}
if (/^\s*$/.test(newStyle))
@@ -161,11 +161,11 @@ var Highlights = Module("Highlight", {
return null;
}
newStyle = highlight.defaultValue;
extends = highlight.defaultExtends;
bases = highlight.defaultExtends;
}
highlight.set("value", newStyle || "");
highlight.extends = array.uniq(extends, true);
highlight.extends = array.uniq(bases, true);
if (force)
highlight.style.enabled = true;
this.highlight[highlight.class] = highlight;

View File

@@ -836,7 +836,7 @@ unlet s:cpo_save
let result = io.system(arg);
if (result.returnValue != 0)
result.output += "\nshell returned " + res;
result.output += "\nshell returned " + result.returnValue;
modules.commandline.command = "!" + arg;
modules.commandline.commandOutput(<span highlight="CmdOutput">{result.output}</span>);

View File

@@ -1179,7 +1179,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
}
}
if (post)
return [url, elems.join('&'), elems, charset];
return [url, elems.join('&'), charset, elems];
return [url + "?" + elems.join('&'), null, charset];
},