1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-23 16:45:45 +01:00

Experimentally move contexts.js to contexts.jsm.

--HG--
branch : groups
rename : common/content/contexts.js => common/modules/contexts.jsm
This commit is contained in:
Kris Maglione
2011-02-10 21:36:03 -05:00
parent 56a28ec0fa
commit 30e2971424
10 changed files with 419 additions and 344 deletions

View File

@@ -255,7 +255,7 @@ var KeyArgProcessor = Class("KeyArgProcessor", KeyProcessor, {
}
});
var EventHive = Class("EventHive", Group.Hive, {
var EventHive = Class("EventHive", Contexts.Hive, {
init: function init(group) {
init.supercall(this, group);
this.sessionListeners = [];
@@ -321,6 +321,14 @@ var Events = Module("events", {
init: function () {
const self = this;
update(this, {
hives: contexts.Hives("events", EventHive),
user: contexts.hives.events.user,
builtin: contexts.hives.events.builtin
});
EventHive.prototype.wrapListener = this.closure.wrapListener;
XML.ignoreWhitespace = true;
util.overlayWindow(window, {
append: <e4x xmlns={XUL}>
@@ -342,10 +350,6 @@ var Events = Module("events", {
this._macroKeys = [];
this._lastMacro = "";
EventHive.prototype.wrapListener = this.closure.wrapListener;
this.user = contexts.hives.events.user;
this.builtin = contexts.hives.events.builtin;
this._macros = storage.newMap("macros", { privateData: true, store: true });
for (let [k, m] in this._macros)
if (isString(m))
@@ -411,8 +415,6 @@ var Events = Module("events", {
});
},
hives: Group.Hives("events", EventHive),
/**
* Adds an event listener for this session and removes it on
* dactyl shutdown.