mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-30 06:32:27 +01:00
[bootstrap] Changes toward proper reinitialization after disabling.
--HG-- branch : bootstrapped
This commit is contained in:
@@ -38,6 +38,19 @@ const Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase),
|
||||
};
|
||||
},
|
||||
|
||||
cleanup: function () {
|
||||
delete window.dactyl;
|
||||
delete window.liberator;
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
autocommands.trigger("LeavePre", {});
|
||||
storage.saveAll();
|
||||
dactyl.triggerObserver("shutdown", null);
|
||||
util.dump("All dactyl modules destroyed\n");
|
||||
autocommands.trigger("Leave", {});
|
||||
},
|
||||
|
||||
observe: {
|
||||
"dactyl-cleanup": function () {
|
||||
for (let [, mod] in iter(array(values(modules)).reverse()))
|
||||
@@ -65,20 +78,6 @@ const Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase),
|
||||
return "unknown";
|
||||
}),
|
||||
|
||||
cleanup: function () {
|
||||
delete window.dactyl;
|
||||
delete window.modules;
|
||||
delete window.liberator;
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
autocommands.trigger("LeavePre", {});
|
||||
storage.saveAll();
|
||||
dactyl.triggerObserver("shutdown", null);
|
||||
util.dump("All dactyl modules destroyed\n");
|
||||
autocommands.trigger("Leave", {});
|
||||
},
|
||||
|
||||
/**
|
||||
* @property {number} The current main mode.
|
||||
* @see modes#mainModes
|
||||
|
||||
Reference in New Issue
Block a user