From c8faebba0a7da5bb82f3df0a7adb580116431060 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sun, 26 Sep 2010 10:36:46 -0400 Subject: [PATCH] Preparation for a future commit and fix ;F in the MOW. --- common/content/commandline.js | 40 ++++++------ common/content/configbase.js | 3 +- common/content/dactyl.xul | 70 +++++++++++--------- common/content/hints.js | 37 +++++------ common/content/javascript.js | 4 +- common/content/modes.js | 24 +++++-- common/modules/base.jsm | 119 ++++++++++++++++++++++------------ common/modules/styles.jsm | 56 ++++++++-------- 8 files changed, 205 insertions(+), 148 deletions(-) diff --git a/common/content/commandline.js b/common/content/commandline.js index aa894c82..57f00f4c 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -110,26 +110,6 @@ const CommandLine = Module("commandline", { this._startHints = false; // whether we're waiting to start hints mode this._lastSubstring = ""; - memoize(this, "widgets", function () { - let widgets = { - commandline: document.getElementById("dactyl-commandline"), - prompt: document.getElementById("dactyl-commandline-prompt"), - command: document.getElementById("dactyl-commandline-command"), - - message: document.getElementById("dactyl-message"), - - multilineOutput: document.getElementById("dactyl-multiline-output"), - multilineInput: document.getElementById("dactyl-multiline-input") - }; - - widgets.command.inputField.QueryInterface(Ci.nsIDOMNSEditableElement); - widgets.message.inputField.QueryInterface(Ci.nsIDOMNSEditableElement); - widgets.mowContainer = widgets.multilineOutput.parentNode; - - widgets.multilineOutput.contentDocument.body.id = "dactyl-multiline-output-content"; - return widgets; - }); - // we need to save the mode which were in before opening the command line // this is then used if we focus the command line again without the "official" // way of calling "open" @@ -344,6 +324,26 @@ const CommandLine = Module("commandline", { }, this); }, + widgets: Class.memoize(function () { + let widgets = { + commandline: document.getElementById("dactyl-commandline"), + prompt: document.getElementById("dactyl-commandline-prompt"), + command: document.getElementById("dactyl-commandline-command"), + + message: document.getElementById("dactyl-message"), + + multilineOutput: document.getElementById("dactyl-multiline-output"), + multilineInput: document.getElementById("dactyl-multiline-input") + }; + + widgets.command.inputField.QueryInterface(Ci.nsIDOMNSEditableElement); + widgets.message.inputField.QueryInterface(Ci.nsIDOMNSEditableElement); + widgets.mowContainer = widgets.multilineOutput.parentNode; + + widgets.multilineOutput.contentDocument.body.id = "dactyl-multiline-output-content"; + return widgets; + }), + // @param type can be: // "submit": when the user pressed enter in the command line // "change" diff --git a/common/content/configbase.js b/common/content/configbase.js index 8cd20004..bb6d62b5 100644 --- a/common/content/configbase.js +++ b/common/content/configbase.js @@ -127,8 +127,7 @@ const ConfigBase = Class(ModuleBase, { */ scripts: [], - get tabStrip() - Class.replaceProperty(this, "tabStrip", document.getElementById("TabsToolbar") || this.tabbrowser.mTabContainer), + tabStrip: Class.memoize(function () document.getElementById("TabsToolbar") || this.tabbrowser.mTabContainer), /** * @property {string} The leaf name of any temp files created by diff --git a/common/content/dactyl.xul b/common/content/dactyl.xul index 49e15ff5..f5fc9bfc 100644 --- a/common/content/dactyl.xul +++ b/common/content/dactyl.xul @@ -9,8 +9,11 @@ + + + + ]> - - + + @@ -35,61 +38,68 @@ - - + + +