From d0831ec8e6efc27b335e65fbbfd36147f0a33aa7 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 26 Mar 2011 15:27:59 -0400 Subject: [PATCH] Add missing docs and make 'showmode' a stringlist like 'passunknown' rather than a regexplist. --- common/content/dactyl.js | 4 ++ common/content/modes.js | 123 ++++++++++++++++++++++---------- common/locale/en-US/map.xml | 11 ++- common/locale/en-US/options.xml | 23 +++++- common/locale/en-US/tabs.xml | 4 +- common/modules/commands.jsm | 2 +- common/modules/config.jsm | 5 +- pentadactyl/NEWS | 2 + 8 files changed, 131 insertions(+), 43 deletions(-) diff --git a/common/content/dactyl.js b/common/content/dactyl.js index f5824435..1bb6a68a 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -605,6 +605,10 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { * Initialize the help system. */ initHelp: function (force) { + // Waits for the add-on to become available, if necessary. + config.addon; + config.version; + if (force || !this.helpInitialized) { if ("noscriptOverlay" in window) { noscriptOverlay.safeAllow("chrome-data:", true, false); diff --git a/common/content/modes.js b/common/content/modes.js index 2840ea6c..4976db15 100644 --- a/common/content/modes.js +++ b/common/content/modes.js @@ -207,6 +207,51 @@ var Modes = Module("modes", { } }); + + function makeTree() { + let list = modes.all.filter(function (m) m.name !== m.description); + + let tree = {}; + + for (let mode in values(list)) + tree[mode.name] = {}; + + for (let mode in values(list)) + for (let base in values(mode.bases)) + tree[base.name][mode.name] = tree[mode.name]; + + let roots = iter([m.name, tree[m.name]] for (m in values(list)) if (!m.bases.length)).toObject(); + + default xml namespace = NS; + function rec(obj) { + XML.ignoreWhitespace = XML.prettyPrinting = false; + + let res =