1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-29 12:02:25 +01:00

Add first crude binary module implementation.

This commit is contained in:
Kris Maglione
2011-09-22 21:08:40 -04:00
parent d568ce8762
commit 6af256bc53
17 changed files with 1290 additions and 6 deletions

View File

@@ -509,7 +509,8 @@ var CommandHive = Class("CommandHive", Contexts.Hive, {
let closure = function () self._map[name];
memoize(this._map, name, function () commands.Command(specs, description, action, extra));
memoize(this._list, this._list.length, closure);
if (!extra.hidden)
memoize(this._list, this._list.length, closure);
for (let alias in values(names.slice(1)))
memoize(this._map, alias, closure);
@@ -1404,9 +1405,11 @@ var Commands = Module("commands", {
const { commands, contexts } = modules;
commands.add(["(", "-("], "",
function (args) { dactyl.echoerr(_("dactyl.cheerUp")); });
function (args) { dactyl.echoerr(_("dactyl.cheerUp")); },
{ hidden: true });
commands.add([")", "-)"], "",
function (args) { dactyl.echoerr(_("dactyl.somberDown")); });
function (args) { dactyl.echoerr(_("dactyl.somberDown")); },
{ hidden: true });
commands.add(["com[mand]"],
"List or define commands",

View File

@@ -344,7 +344,7 @@ var IO = Module("io", {
return uri;
let channel = services.io.newChannelFromURI(uri);
channel.cancel(Cr.NS_BINDING_ABORTED);
try { channel.cancel(Cr.NS_BINDING_ABORTED); } catch (e) {}
if (channel instanceof Ci.nsIJARChannel)
return channel.URI.QueryInterface(Ci.nsIJARURI);
}

View File

@@ -290,7 +290,7 @@ var Overlay = Module("Overlay", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReferen
* property in *overrides* is added to *object*, replacing any
* original value. Functions in *overrides* are augmented with the
* new properties *super*, *supercall*, and *superapply*, in the
* same manner as class methods, so that they man call their
* same manner as class methods, so that they may call their
* overridden counterparts.
*
* @param {object} object The object to overlay.

View File

@@ -33,6 +33,7 @@ var Services = Module("Services", {
this.add("clipboardHelper", "@mozilla.org/widget/clipboardhelper;1", "nsIClipboardHelper");
this.add("commandLineHandler", "@mozilla.org/commandlinehandler/general-startup;1?type=dactyl");
this.add("console", "@mozilla.org/consoleservice;1", "nsIConsoleService");
this.add("dactyl", "@dactyl.googlecode.com/extra/utils", "dactylIUtils");
this.add("dactyl:", "@mozilla.org/network/protocol;1?name=dactyl");
this.add("debugger", "@mozilla.org/js/jsd/debugger-service;1", "jsdIDebuggerService");
this.add("directory", "@mozilla.org/file/directory_service;1", "nsIProperties");

View File

@@ -636,7 +636,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
return File(uri);
let channel = services.io.newChannelFromURI(uri);
channel.cancel(Cr.NS_BINDING_ABORTED);
try { channel.cancel(Cr.NS_BINDING_ABORTED); } catch (e) {}
if (channel instanceof Ci.nsIFileChannel)
return File(channel.file);
}