diff options
author | Kris Maglione <maglione.k@gmail.com> | 2011-01-24 08:53:58 -0500 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2011-01-24 08:53:58 -0500 |
commit | 8980c91978a872c5c508bb0f3d8bdd03baec5707 (patch) | |
tree | c1dc5f4c465521cd35bc31b29f984f318dcdc767 | |
parent | 1d08056350e0fa9678ad5f24653e7f1afb7e9979 (diff) | |
download | pentadactyl-8980c91978a872c5c508bb0f3d8bdd03baec5707.tar.gz |
Linkify 'restart' in :addons.
--HG--
branch : key-processing
-rw-r--r-- | common/content/dactyl.js | 3 | ||||
-rw-r--r-- | common/modules/addons.jsm | 8 | ||||
-rw-r--r-- | common/skin/dactyl.css | 3 |
3 files changed, 12 insertions, 2 deletions
diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 8c65f810..d169299d 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -37,6 +37,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { let elem = event.originalTarget; dactyl.help(elem.getAttribute("tag") || elem.textContent); }; + this.commands["dactyl.restart"] = function (event) { + dactyl.restart(); + }; }, cleanup: function () { diff --git a/common/modules/addons.jsm b/common/modules/addons.jsm index 80090bb7..ed971c1c 100644 --- a/common/modules/addons.jsm +++ b/common/modules/addons.jsm @@ -145,6 +145,7 @@ var Addon = Class("Addon", { this.nodes = { commandTarget: this }; + XML.ignoreWhitespace = true; util.xmlToDom( <li highlight="Addon" key="row" xmlns:dactyl={NS} xmlns={XHTML}> <span highlight="AddonName" key="name"> @@ -189,6 +190,9 @@ var Addon = Class("Addon", { compare: function compare(other) String.localeCompare(this.name, other.name), get statusInfo() { + XML.ignoreWhitespace = XML.prettyPrinting = false; + default xml namespace = XHTML; + let info = this.isActive ? <span highlight="Enabled">enabled</span> : <span highlight="Disabled">disabled</span>; @@ -205,7 +209,7 @@ var Addon = Class("Addon", { pending = ["Enabled", "upgraded"]; if (pending) return <>{info} (<span highlight={pending[0]}>{pending[1]}</span> -  on restart)</>; +  on <a href="#" dactyl:command="dactyl.restart" xmlns:dactyl={NS}>restart</a>)</>; return info; }, @@ -269,6 +273,7 @@ var AddonList = Class("AddonList", { message: Class.memoize(function () { + XML.ignoreWhitespace = true; util.xmlToDom(<ul highlight="Addons" key="list" xmlns={XHTML}> <li highlight="AddonHead"> <span>Name</span> @@ -535,7 +540,6 @@ var addonErrors = array.toObject([ [AddonManager.ERROR_CORRUPT_FILE, "The file appears to be corrupt"], [AddonManager.ERROR_FILE_ACCESS, "There was an error accessing the filesystem"]]); - endModule(); } catch(e){ if (isString(e)) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } diff --git a/common/skin/dactyl.css b/common/skin/dactyl.css index 116df39b..43788990 100644 --- a/common/skin/dactyl.css +++ b/common/skin/dactyl.css @@ -83,6 +83,9 @@ input[type=file][dactyl|highlight~=HintElem] { url-prefix(dactyl:), url-prefix(resource://dactyl) { +*:-moz-any-link { + color: green; +} *:-moz-any-link:hover { text-decoration: underline; } |