mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-07 05:15:47 +01:00
[bootstrapped] Minor changes.
--HG-- branch : bootstrapped
This commit is contained in:
18
common/bootstrap.js
vendored
18
common/bootstrap.js
vendored
@@ -43,7 +43,7 @@ let components = {};
|
|||||||
let getURI = null;
|
let getURI = null;
|
||||||
|
|
||||||
function startup(data, reason) {
|
function startup(data, reason) {
|
||||||
dump("dactyl: bootstrap: startup\n");
|
dump("dactyl: bootstrap: startup " + reasonToString(reason) + "\n");
|
||||||
basePath = data.installPath;
|
basePath = data.installPath;
|
||||||
|
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
@@ -180,11 +180,13 @@ function init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function shutdown(data, reason) {
|
function shutdown(data, reason) {
|
||||||
dump("dactyl: bootstrap: shutdown\n");
|
dump("dactyl: bootstrap: shutdown " + reasonToString(reason) + "\n");
|
||||||
services.observer.notifyObservers(null, "dactyl-cleanup", null);
|
if (reason != APP_SHUTDOWN) {
|
||||||
for (let factory in values(components))
|
services.observer.notifyObservers(null, "dactyl-cleanup", null);
|
||||||
// TODO: Categories;
|
for (let factory in values(components))
|
||||||
factory.unregister();
|
// TODO: Categories;
|
||||||
|
factory.unregister();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function reasonToString(reason) {
|
function reasonToString(reason) {
|
||||||
@@ -196,6 +198,6 @@ function reasonToString(reason) {
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
function install(data, reason) { dump("dactyl: bootstrap: install\n") }
|
function install(data, reason) { dump("dactyl: bootstrap: install " + reasonToString(reason) + "\n") }
|
||||||
function uninstall(data, reason) { dump("dactyl: bootstrap: uninstall\n") }
|
function uninstall(data, reason) { dump("dactyl: bootstrap: uninstall " + reasonToString(reason) + "\n") }
|
||||||
|
|
||||||
|
|||||||
@@ -137,23 +137,8 @@ const CommandWidgets = Class("CommandWidgets", {
|
|||||||
return this.statusbar;
|
return this.statusbar;
|
||||||
|
|
||||||
let statusElem = this.statusbar.message;
|
let statusElem = this.statusbar.message;
|
||||||
if (!statusElem.editor) {
|
if (value && statusElem.editor.rootElement.scrollWidth > statusElem.scrollWidth)
|
||||||
util.dump(commandline == window.dactyl.modules.commandline,
|
return this.commandbar;
|
||||||
window.dactyl.modules.commandline.widgets == this,
|
|
||||||
commandline.widgets == this);
|
|
||||||
util.dumpStack();
|
|
||||||
|
|
||||||
for (let i=0, e = statusElem; e; e = e.parentNode)
|
|
||||||
util.dump(i++, e == statusline._statusLine.firstChild,
|
|
||||||
e == statusline.widgets.container,
|
|
||||||
e);
|
|
||||||
util.dump(statusElem == statusline.widgets.message);
|
|
||||||
util.dump(statusline._statusLine.firstChild == statusline.widgets.container);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (value && statusElem.editor.rootElement.scrollWidth > statusElem.scrollWidth)
|
|
||||||
return this.commandbar;
|
|
||||||
}
|
|
||||||
return this.activeGroup.mode;
|
return this.activeGroup.mode;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -292,10 +292,10 @@ const Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
|
|||||||
([^]*?) // 1
|
([^]*?) // 1
|
||||||
(?:
|
(?:
|
||||||
(<\[) | // 2
|
(<\[) | // 2
|
||||||
(< (.*?) >) | // 3 4
|
(< ((?:[a-z]-)?[a-z-]*?) >) | // 3 4
|
||||||
(\]>) // 5
|
(\]>) // 5
|
||||||
)
|
)
|
||||||
]]>, "gy");
|
]]>, "giy");
|
||||||
while (match = re.exec(macro)) {
|
while (match = re.exec(macro)) {
|
||||||
let [, prefix, open, full, macro, close] = match;
|
let [, prefix, open, full, macro, close] = match;
|
||||||
end += match[0].length;
|
end += match[0].length;
|
||||||
|
|||||||
Reference in New Issue
Block a user