mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-03 22:25:46 +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;
|
||||
|
||||
function startup(data, reason) {
|
||||
dump("dactyl: bootstrap: startup\n");
|
||||
dump("dactyl: bootstrap: startup " + reasonToString(reason) + "\n");
|
||||
basePath = data.installPath;
|
||||
|
||||
if (!initialized) {
|
||||
@@ -180,11 +180,13 @@ function init() {
|
||||
}
|
||||
|
||||
function shutdown(data, reason) {
|
||||
dump("dactyl: bootstrap: shutdown\n");
|
||||
services.observer.notifyObservers(null, "dactyl-cleanup", null);
|
||||
for (let factory in values(components))
|
||||
// TODO: Categories;
|
||||
factory.unregister();
|
||||
dump("dactyl: bootstrap: shutdown " + reasonToString(reason) + "\n");
|
||||
if (reason != APP_SHUTDOWN) {
|
||||
services.observer.notifyObservers(null, "dactyl-cleanup", null);
|
||||
for (let factory in values(components))
|
||||
// TODO: Categories;
|
||||
factory.unregister();
|
||||
}
|
||||
}
|
||||
|
||||
function reasonToString(reason) {
|
||||
@@ -196,6 +198,6 @@ function reasonToString(reason) {
|
||||
return name;
|
||||
}
|
||||
|
||||
function install(data, reason) { dump("dactyl: bootstrap: install\n") }
|
||||
function uninstall(data, reason) { dump("dactyl: bootstrap: uninstall\n") }
|
||||
function install(data, reason) { dump("dactyl: bootstrap: install " + reasonToString(reason) + "\n") }
|
||||
function uninstall(data, reason) { dump("dactyl: bootstrap: uninstall " + reasonToString(reason) + "\n") }
|
||||
|
||||
|
||||
@@ -137,23 +137,8 @@ const CommandWidgets = Class("CommandWidgets", {
|
||||
return this.statusbar;
|
||||
|
||||
let statusElem = this.statusbar.message;
|
||||
if (!statusElem.editor) {
|
||||
util.dump(commandline == window.dactyl.modules.commandline,
|
||||
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;
|
||||
}
|
||||
if (value && statusElem.editor.rootElement.scrollWidth > statusElem.scrollWidth)
|
||||
return this.commandbar;
|
||||
return this.activeGroup.mode;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -292,10 +292,10 @@ const Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
|
||||
([^]*?) // 1
|
||||
(?:
|
||||
(<\[) | // 2
|
||||
(< (.*?) >) | // 3 4
|
||||
(< ((?:[a-z]-)?[a-z-]*?) >) | // 3 4
|
||||
(\]>) // 5
|
||||
)
|
||||
]]>, "gy");
|
||||
]]>, "giy");
|
||||
while (match = re.exec(macro)) {
|
||||
let [, prefix, open, full, macro, close] = match;
|
||||
end += match[0].length;
|
||||
|
||||
Reference in New Issue
Block a user