1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 19:57:58 +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) get modeChar() Abbreviation.modeChar(this.modes)
}, { }, {
modeChar: function (_modes) { modeChar: function (_modes) {
let result = ""; let result = array.uniq(_modes.map(function (m) m.char)).join("");
for (let [, mode] in Iterator(_modes)) if (result == "ci")
result += modes.getMode(mode).char;
if (/^(ic|ci)$/(result))
result = "!"; result = "!";
return result; return result;
} }

View File

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

View File

@@ -159,7 +159,11 @@ function defineModule(name, params) {
defineModule.loadLog = []; defineModule.loadLog = [];
Object.defineProperty(defineModule.loadLog, "push", { 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_() { defineModule.dump = function dump_() {
let msg = Array.map(arguments, function (msg) { let msg = Array.map(arguments, function (msg) {

View File

@@ -250,7 +250,7 @@ var Overlay = Module("Overlay", {
deferredInit["load"].forEach(call); deferredInit["load"].forEach(call);
modules.times = update({}, defineModule.times); 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() { modules.events.addSessionListener(window, "unload", function onUnload() {
window.removeEventListener("unload", onUnload.wrapped, false); window.removeEventListener("unload", onUnload.wrapped, false);

View File

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

View File

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

View File

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