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

Add 'linenumbers'.

This commit is contained in:
Kris Maglione
2011-09-27 01:21:29 -04:00
parent 0f9cb3100b
commit c90629c71f
10 changed files with 128 additions and 45 deletions

View File

@@ -7,9 +7,11 @@
Components.utils.import("resource://dactyl/bootstrap.jsm");
defineModule("storage", {
exports: ["File", "Storage", "storage"],
require: ["services", "util"]
require: ["config", "services", "util"]
}, this);
this.lazyRequire("io", ["IO"]);
var win32 = /^win(32|nt)$/i.test(services.runtime.OS);
var myObject = JSON.parse("{}").constructor;
@@ -169,6 +171,10 @@ var Storage = Module("Storage", {
this.observers = {};
},
infoPath: Class.Memoize(function ()
File(IO.runtimePath.replace(/,.*/, ""))
.child("info").child(config.profileName)),
exists: function exists(name) this.infoPath.child(name).exists(),
newObject: function newObject(key, constructor, params) {
@@ -270,12 +276,6 @@ var Storage = Module("Storage", {
skipXpcom: function skipXpcom(key, val) val instanceof Ci.nsISupports ? null : val
}
}, {
init: function init(dactyl, modules) {
init.superapply(this, arguments);
storage.infoPath = File(modules.IO.runtimePath.replace(/,.*/, ""))
.child("info").child(dactyl.profileName);
},
cleanup: function (dactyl, modules, window) {
overlay.setData(window, "storage-refs", null);
this.removeDeadObservers();