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

Release 1.0 βeta 4.

This commit is contained in:
Kris Maglione
2010-12-30 22:59:12 -05:00
parent eb59a48d77
commit 2a218c2785
8 changed files with 18 additions and 16 deletions

View File

@@ -32,10 +32,8 @@ var Abbreviation = Class("Abbreviation", {
get modeChar() Abbreviation.modeChar(this.modes)
}, {
modeChar: function (_modes) {
let result = "";
for (let [, mode] in Iterator(_modes))
result += modes.getMode(mode).char;
if (/^(ic|ci)$/(result))
let result = array.uniq(_modes.map(function (m) m.char)).join("");
if (result == "ci")
result = "!";
return result;
}

View File

@@ -527,7 +527,6 @@ var Mappings = Module("mappings", {
return null;
}
function uniqueModes(modes) {
modes = modes.map(modules.modes.closure.getMode);
let chars = [k for ([k, v] in Iterator(modules.modes.modeChars))
if (v.every(function (mode) modes.indexOf(mode) >= 0))];
return array.uniq(modes.filter(function (m) chars.indexOf(m.char) < 0).concat(chars));

View File

@@ -228,10 +228,11 @@ var Modes = Module("modes", {
getStack: function (idx) this._modeStack[this._modeStack.length - idx - 1] || this._modeStack[0],
getCharModes: function (chr) [m for (m in values(this._modeMap)) if (m.char == chr)],
getCharModes: function (chr) (this.modeChars[chr] || []).slice(),
matchModes: function (obj)
[m for (m in values(this._modeMap)) if (Object.keys(obj).every(function (k) obj[k] == (m[k] || false)))],
this._modes.filter(function (mode) Object.keys(obj)
.every(function (k) obj[k] == (mode[k] || false))),
// show the current mode string in the command line
show: function show() {

View File

@@ -159,7 +159,11 @@ function defineModule(name, params) {
defineModule.loadLog = [];
Object.defineProperty(defineModule.loadLog, "push", {
value: function (val) { defineModule.dump(val + "\n"); this[this.length] = val; }
value: function (val) {
if (false)
defineModule.dump(val + "\n");
this[this.length] = Date.now() + " " + val;
}
});
defineModule.dump = function dump_() {
let msg = Array.map(arguments, function (msg) {

View File

@@ -250,7 +250,7 @@ var Overlay = Module("Overlay", {
deferredInit["load"].forEach(call);
modules.times = update({}, defineModule.times);
util.dump("Loaded in " + (Date.now() - start) + "ms");
defineModule.loadLog.push("Loaded in " + (Date.now() - start) + "ms");
modules.events.addSessionListener(window, "unload", function onUnload() {
window.removeEventListener("unload", onUnload.wrapped, false);

View File

@@ -932,7 +932,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
observe: {
"dactyl-cleanup-modules": function () {
util.dump("dactyl: util: observe: dactyl-cleanup-modules");
defineModule.loadLog.push("dactyl: util: observe: dactyl-cleanup-modules");
for (let module in values(defineModule.modules))
if (module.cleanup) {
@@ -945,12 +945,12 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
"dactyl-rehash": function () {
services.observer.removeObserver(this, "dactyl-rehash");
util.dump("dactyl: util: observe: dactyl-rehash");
defineModule.loadLog.push("dactyl: util: observe: dactyl-rehash");
if (this.rehashing)
JSMLoader.purge();
else
for (let module in values(defineModule.modules)) {
util.dump("dactyl: util: init(" + module + ")");
defineModule.loadLog.push("dactyl: util: init(" + module + ")");
if (module.reinit)
module.reinit();
else
@@ -974,7 +974,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
if (!window.dactylOverlays)
window.dactylOverlays = [];
util.dump("load overlays", window.document.documentURI);
defineModule.loadLog.push("load overlays " + window.document.documentURI);
for each (let obj in util.overlays[window.document.documentURI] || []) {
if (window.dactylOverlays.indexOf(obj) >= 0)
@@ -988,7 +988,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
if (!doc.dactylOverlayElements)
doc.dactylOverlayElements = [];
util.dump("load overlay", doc.documentURI, String(obj).substr(0, 60));
defineModule.loadLog.push("load overlays " + doc.documentURI + " " + String(obj).substr(0, 60));
function overlay(key, fn) {
if (obj[key]) {

View File

@@ -1,4 +1,4 @@
1.0b4pre:
1.0b4:
* Extensive Firefox 4 support, including:
- Fully restartless. Can now be installed, uninstalled,
enabled, disabled, and upgraded without restarting Firefox.

View File

@@ -4,7 +4,7 @@
<Description about="urn:mozilla:install-manifest"
em:id="pentadactyl@dactyl.googlecode.com"
em:name="Pentadactyl"
em:version="1.0b4pre"
em:version="1.0b4"
em:description="Firefox for Vim and Links addicts"
em:homepageURL="http://dactyl.sourceforge.net/pentadactyl"
em:iconURL="chrome://pentadactyl/skin/icon.png"