mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-30 20:15:46 +01:00
Linkify 'restart' in :addons.
--HG-- extra : transplant_source : %EA%88%BD%A9%8FB%DD%24%A4%CC%3E%F9I%87%FB%8A7%C8%11%CC
This commit is contained in:
@@ -37,6 +37,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
let elem = event.originalTarget;
|
let elem = event.originalTarget;
|
||||||
dactyl.help(elem.getAttribute("tag") || elem.textContent);
|
dactyl.help(elem.getAttribute("tag") || elem.textContent);
|
||||||
};
|
};
|
||||||
|
this.commands["dactyl.restart"] = function (event) {
|
||||||
|
dactyl.restart();
|
||||||
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
cleanup: function () {
|
cleanup: function () {
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ var Addon = Class("Addon", {
|
|||||||
this.nodes = {
|
this.nodes = {
|
||||||
commandTarget: this
|
commandTarget: this
|
||||||
};
|
};
|
||||||
|
XML.ignoreWhitespace = true;
|
||||||
util.xmlToDom(
|
util.xmlToDom(
|
||||||
<li highlight="Addon" key="row" xmlns:dactyl={NS} xmlns={XHTML}>
|
<li highlight="Addon" key="row" xmlns:dactyl={NS} xmlns={XHTML}>
|
||||||
<span highlight="AddonName" key="name">
|
<span highlight="AddonName" key="name">
|
||||||
@@ -189,6 +190,9 @@ var Addon = Class("Addon", {
|
|||||||
compare: function compare(other) String.localeCompare(this.name, other.name),
|
compare: function compare(other) String.localeCompare(this.name, other.name),
|
||||||
|
|
||||||
get statusInfo() {
|
get statusInfo() {
|
||||||
|
XML.ignoreWhitespace = XML.prettyPrinting = false;
|
||||||
|
default xml namespace = XHTML;
|
||||||
|
|
||||||
let info = this.isActive ? <span highlight="Enabled">enabled</span>
|
let info = this.isActive ? <span highlight="Enabled">enabled</span>
|
||||||
: <span highlight="Disabled">disabled</span>;
|
: <span highlight="Disabled">disabled</span>;
|
||||||
|
|
||||||
@@ -205,7 +209,7 @@ var Addon = Class("Addon", {
|
|||||||
pending = ["Enabled", "upgraded"];
|
pending = ["Enabled", "upgraded"];
|
||||||
if (pending)
|
if (pending)
|
||||||
return <>{info} (<span highlight={pending[0]}>{pending[1]}</span>
|
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;
|
return info;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -269,6 +273,7 @@ var AddonList = Class("AddonList", {
|
|||||||
|
|
||||||
message: Class.memoize(function () {
|
message: Class.memoize(function () {
|
||||||
|
|
||||||
|
XML.ignoreWhitespace = true;
|
||||||
util.xmlToDom(<ul highlight="Addons" key="list" xmlns={XHTML}>
|
util.xmlToDom(<ul highlight="Addons" key="list" xmlns={XHTML}>
|
||||||
<li highlight="AddonHead">
|
<li highlight="AddonHead">
|
||||||
<span>Name</span>
|
<span>Name</span>
|
||||||
@@ -535,7 +540,6 @@ var addonErrors = array.toObject([
|
|||||||
[AddonManager.ERROR_CORRUPT_FILE, "The file appears to be corrupt"],
|
[AddonManager.ERROR_CORRUPT_FILE, "The file appears to be corrupt"],
|
||||||
[AddonManager.ERROR_FILE_ACCESS, "There was an error accessing the filesystem"]]);
|
[AddonManager.ERROR_FILE_ACCESS, "There was an error accessing the filesystem"]]);
|
||||||
|
|
||||||
|
|
||||||
endModule();
|
endModule();
|
||||||
|
|
||||||
} catch(e){ if (isString(e)) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); }
|
} catch(e){ if (isString(e)) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); }
|
||||||
|
|||||||
@@ -83,6 +83,9 @@ input[type=file][dactyl|highlight~=HintElem] {
|
|||||||
url-prefix(dactyl:),
|
url-prefix(dactyl:),
|
||||||
url-prefix(resource://dactyl) {
|
url-prefix(resource://dactyl) {
|
||||||
|
|
||||||
|
*:-moz-any-link {
|
||||||
|
color: green;
|
||||||
|
}
|
||||||
*:-moz-any-link:hover {
|
*:-moz-any-link:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user