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

Add input:true to modes.MENU, just for the hell of it.

This commit is contained in:
Kris Maglione
2011-01-01 03:21:30 -05:00
parent ac8347dc03
commit d8bb3f4b32
3 changed files with 7 additions and 4 deletions

View File

@@ -139,6 +139,7 @@ var Modes = Module("modes", {
}); });
this.addMode("MENU", { this.addMode("MENU", {
extended: true, extended: true,
input: true,
description: "Active when a menu or other pop-up is open", description: "Active when a menu or other pop-up is open",
}); // a popupmenu is active }); // a popupmenu is active
this.addMode("LINE", { this.addMode("LINE", {

View File

@@ -71,7 +71,7 @@ var Services = Module("Services", {
this.addClass("HtmlEncoder", "@mozilla.org/layout/htmlCopyEncoder;1", Ci.nsIDocumentEncoder); this.addClass("HtmlEncoder", "@mozilla.org/layout/htmlCopyEncoder;1", Ci.nsIDocumentEncoder);
this.addClass("Persist", "@mozilla.org/embedding/browser/nsWebBrowserPersist;1", Ci.nsIWebBrowserPersist); this.addClass("Persist", "@mozilla.org/embedding/browser/nsWebBrowserPersist;1", Ci.nsIWebBrowserPersist);
this.addClass("Process", "@mozilla.org/process/util;1", Ci.nsIProcess, "init"); this.addClass("Process", "@mozilla.org/process/util;1", Ci.nsIProcess, "init");
this.addClass("String", "@mozilla.org/supports-string;1", Ci.nsISupportsString); this.addClass("String", "@mozilla.org/supports-string;1", Ci.nsISupportsString, "data");
this.addClass("Timer", "@mozilla.org/timer;1", Ci.nsITimer, "initWithCallback"); this.addClass("Timer", "@mozilla.org/timer;1", Ci.nsITimer, "initWithCallback");
this.addClass("Xmlhttp", "@mozilla.org/xmlextras/xmlhttprequest;1", Ci.nsIXMLHttpRequest); this.addClass("Xmlhttp", "@mozilla.org/xmlextras/xmlhttprequest;1", Ci.nsIXMLHttpRequest);
this.addClass("ZipReader", "@mozilla.org/libjar/zip-reader;1", Ci.nsIZipReader, "open"); this.addClass("ZipReader", "@mozilla.org/libjar/zip-reader;1", Ci.nsIZipReader, "open");
@@ -163,7 +163,10 @@ var Services = Module("Services", {
return res.wrappedJSObject; return res.wrappedJSObject;
Array.concat(ifaces).forEach(function (iface) res.QueryInterface(iface)); Array.concat(ifaces).forEach(function (iface) res.QueryInterface(iface));
if (init && args.length) if (init && args.length)
res[init].apply(res, args); if (callable(res[init]))
res[init].apply(res, args);
else
res[init] = args[0];
return res; return res;
} }
catch (e) { catch (e) {

View File

@@ -459,8 +459,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
else if (node instanceof Ci.nsIDOMRange) else if (node instanceof Ci.nsIDOMRange)
encoder.setRange(node); encoder.setRange(node);
let str = services.String(); let str = services.String(encoder.encodeToString());
str.data = encoder.encodeToString();
if (html) if (html)
return str.data; return str.data;