1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 04:07:59 +01:00

Cut down on some error console noise when generating XPCOM stubs.

This commit is contained in:
Kris Maglione
2010-10-03 22:15:49 -04:00
parent 106b9163c2
commit 6d472abb18
6 changed files with 24 additions and 9 deletions

View File

@@ -195,7 +195,15 @@ Shim.prototype = {
contractID: "@dactyl.googlecode.com/base/xpc-interface-shim", contractID: "@dactyl.googlecode.com/base/xpc-interface-shim",
classID: Components.ID("{f4506a17-5b4d-4cd9-92d4-2eb4630dc388}"), classID: Components.ID("{f4506a17-5b4d-4cd9-92d4-2eb4630dc388}"),
classDescription: "XPCOM empty interface shim", classDescription: "XPCOM empty interface shim",
QueryInterface: function () this QueryInterface: function (iid) {
if (iid.equals(Ci.nsISecurityCheckedComponent))
throw Components.results.NS_ERROR_NO_INTERFACE;
return this
},
getHelperForLanguage: function () null,
getInterfaces: function (count) {
count.value = 0;
}
}; };
if (XPCOMUtils.generateNSGetFactory) if (XPCOMUtils.generateNSGetFactory)

View File

@@ -179,7 +179,6 @@ const ConfigBase = Class(ModuleBase, {
StatusWarningMsg color: red !important; background: inherit !important; StatusWarningMsg color: red !important; background: inherit !important;
!CmdLine;>* font-family: monospace !important; padding: 1px !important; !CmdLine;>* font-family: monospace !important; padding: 1px !important;
// !StatusCmdLine>* color: white; background: black; font-weight: normal;
CmdPrompt;.dactyl-commandline-prompt CmdPrompt;.dactyl-commandline-prompt
CmdInput;.dactyl-commandline-command CmdInput;.dactyl-commandline-command
CmdOutput white-space: pre; CmdOutput white-space: pre;

View File

@@ -77,7 +77,7 @@
</vbox> </vbox>
<stack orient="horizontal" align="stretch" class="dactyl-container" id="dactyl-container" dactyl:highlight="CmdLine CmdCmdLine"> <stack orient="horizontal" align="stretch" class="dactyl-container" id="dactyl-container" dactyl:highlight="CmdLine CmdCmdLine">
<textbox class="plain" id="dactyl-mode" flex="1" readonly="true"/> <textbox class="plain" id="dactyl-mode" flex="1" crop="end"/>
<textbox class="plain" id="dactyl-message" flex="1" readonly="true"/> <textbox class="plain" id="dactyl-message" flex="1" readonly="true"/>
<hbox id="dactyl-commandline" hidden="false" class="dactyl-container" dactyl:highlight="Normal CmdNormal" collapsed="true"> <hbox id="dactyl-commandline" hidden="false" class="dactyl-container" dactyl:highlight="Normal CmdNormal" collapsed="true">
@@ -100,9 +100,9 @@
<hbox insertbefore="&dactyl.statusBefore;" insertafter="&dactyl.statusAfter;" <hbox insertbefore="&dactyl.statusBefore;" insertafter="&dactyl.statusAfter;"
style="background: inherit;" id="&status;container" flex="1" hidden="false" align="center"> style="background: inherit;" id="&status;container" flex="1" hidden="false" align="center">
<stack orient="horizontal" align="stretch" flex="1" class="dactyl-container" dactyl:highlight="CmdLine StatusCmdLine"> <stack orient="horizontal" align="stretch" flex="1" class="dactyl-container" dactyl:highlight="CmdLine StatusCmdLine">
<textbox class="plain" id="&status;url" flex="1" readonly="false" crop="end"/> <textbox class="plain" id="&status;url" flex="1" readonly="true" crop="end"/>
<textbox class="plain" id="&status;mode" flex="1" readonly="true" crop="end" collapsed="true"/> <label class="plain" id="&status;mode" flex="1" crop="end" collapsed="true"/>
<textbox class="plain" id="&status;message" flex="1" readonly="true" collapsed="true" dactyl:highlight="Normal StatusNormal"/> <textbox class="plain" id="&status;message" flex="1" readonly="true" crop="end" collapsed="true" dactyl:highlight="Normal StatusNormal"/>
<hbox id="&status;commandline" hidden="false" class="dactyl-container" dactyl:highlight="Normal StatusNormal" collapsed="true"> <hbox id="&status;commandline" hidden="false" class="dactyl-container" dactyl:highlight="Normal StatusNormal" collapsed="true">
<label id="&status;commandline-prompt" class="dactyl-commandline-prompt plain" flex="0" crop="end" value="" collapsed="true"/> <label id="&status;commandline-prompt" class="dactyl-commandline-prompt plain" flex="0" crop="end" value="" collapsed="true"/>

View File

@@ -751,7 +751,7 @@ const Events = Module("events", {
return; return;
} }
if (elem instanceof HTMLTextAreaElement || (elem && elem.contentEditable == "true")) { if (elem instanceof HTMLTextAreaElement || (elem && util.computedStyle(elem).MozUserModify == "read-write")) {
if (options["insertmode"]) if (options["insertmode"])
modes.set(modes.INSERT); modes.set(modes.INSERT);
else if (elem.selectionEnd - elem.selectionStart > 0) else if (elem.selectionEnd - elem.selectionStart > 0)

View File

@@ -715,10 +715,13 @@ Class.extend = function extend(subclass, superclass, overrides) {
*/ */
function XPCOM(interfaces, superClass) { function XPCOM(interfaces, superClass) {
interfaces = Array.concat(interfaces); interfaces = Array.concat(interfaces);
let shim = interfaces.reduce(function (shim, iface) shim.QueryInterface(iface), let shim = interfaces.reduce(function (shim, iface) shim.QueryInterface(iface),
Cc["@dactyl.googlecode.com/base/xpc-interface-shim"].createInstance()); Cc["@dactyl.googlecode.com/base/xpc-interface-shim"].createInstance());
let res = Class("XPCOM(" + interfaces + ")", superClass || Class, update( let res = Class("XPCOM(" + interfaces + ")", superClass || Class, update(
array([k, v === undefined || callable(v) ? function stub() null : v] for ([k, v] in Iterator(shim))).toObject(), array([k, v === undefined || callable(v) ? function stub() null : v]
for ([k, v] in Iterator(shim))).toObject(),
{ QueryInterface: XPCOMUtils.generateQI(interfaces) })); { QueryInterface: XPCOMUtils.generateQI(interfaces) }));
shim = interfaces = null; shim = interfaces = null;
return res; return res;

View File

@@ -78,6 +78,11 @@
color: inherit; color: inherit;
} }
label[collapsed=true] {
height: 0px;
width: 0px;
}
.dactyl-container > * { .dactyl-container > * {
font-family: inherit; font-family: inherit;
} }