diff --git a/common/content/key-processors.js b/common/content/key-processors.js index 30596439..b0f2e30b 100644 --- a/common/content/key-processors.js +++ b/common/content/key-processors.js @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2013 Kris Maglione +// Copyright (c) 2008-2014 Kris Maglione // // This work is licensed for reuse under an MIT license. Details are // given in the LICENSE.txt file included with this file. @@ -107,8 +107,8 @@ var ProcessorStack = Class("ProcessorStack", { this.timer = services.Timer(this, options["timeoutlen"], services.Timer.TYPE_ONE_SHOT); } else if (result !== Events.KILL && !this.actions.length && - !(this.events[0].isReplay || this.passUnknown - || this.modes.some(function (m) m.passEvent(this), this.events[0]))) { + !(this.events[0].isReplay || this.passUnknown || + this.modes.some(function (m) m.passEvent(this), this.events[0]))) { // No patching processors, this isn't a fake, pass-through // event, we're not in pass-through mode, and we're not // choosing to pass unknown keys. Kill the event and beep. diff --git a/common/content/statusline.js b/common/content/statusline.js index f740517f..34d4ce80 100644 --- a/common/content/statusline.js +++ b/common/content/statusline.js @@ -22,6 +22,9 @@ var StatusLine = Module("statusline", { append: [ ["vbox", { id: "browser-bottombox", xmlns: "xul" }, ["toolbar", { id: "dactyl-addon-bar", + customizable: true, + defaultset: "", + toolboxid: "navigator-toolbox", toolbarname: /*L*/ "Add-on Bar", class: "toolbar-primary chromeclass-toolbar", mode: "icons", @@ -55,7 +58,7 @@ var StatusLine = Module("statusline", { -moz-appearance: none !important; } - !AddonButton;:-moz-any(#addon-bar, #dactyl-addon-bar) xul|toolbarbutton { + !AddonButton;,:-moz-any(#addon-bar, #dactyl-addon-bar) xul|toolbarbutton { -moz-appearance: none !important; padding: 0 !important; border-width: 0px !important; @@ -117,6 +120,13 @@ var StatusLine = Module("statusline", { catch (e) {} }, + cleanup: function cleanup(reason) { + util.dump("CLEANUP " + reason); + util.dump(this.statusBar.id, document.getElementById(this.statusBar.id)); + if (reason != "unload" && "CustomizableUI" in window) + CustomizableUI.unregisterArea(this.statusBar.id, false); + }, + get visible() !this.statusBar.collapsed && !this.statusBar.hidden, signals: { diff --git a/common/modules/highlight.jsm b/common/modules/highlight.jsm index e25b7cc1..7ec74142 100644 --- a/common/modules/highlight.jsm +++ b/common/modules/highlight.jsm @@ -1,4 +1,4 @@ -// Copyright (c) 2008-2013 Kris Maglione +// Copyright (c) 2008-2014 Kris Maglione // // This work is licensed for reuse under an MIT license. Details are // given in the LICENSE.txt file included with this file. @@ -125,7 +125,7 @@ var Highlights = Module("Highlight", { if (/^[[>+: ]/.test(args[1])) obj.selector = this.selector(obj.class) + args[1]; else if (args[1]) - obj.selector = this.selector(args[1]); + obj.selector = this.selector(args[1].replace(/^,/, "")); if (old && old.value != old.defaultValue) obj.value = old.value; diff --git a/common/modules/overlay.jsm b/common/modules/overlay.jsm index 796dd736..4f3081e3 100644 --- a/common/modules/overlay.jsm +++ b/common/modules/overlay.jsm @@ -113,6 +113,9 @@ var Overlay = Module("Overlay", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReferen cleanup: function cleanup(reason) { for (let doc in util.iterDocuments()) { + for (let callback in values(this.getData(doc, "cleanup"))) + util.trapErrors(callback, doc, reason); + for (let elem in values(this.getData(doc, "overlayElements"))) if (elem.parentNode) elem.parentNode.removeChild(elem); @@ -121,9 +124,6 @@ var Overlay = Module("Overlay", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReferen if (getAttr(elem, ns, name) === value) setAttr(elem, ns, name, orig); - for (let callback in values(this.getData(doc, "cleanup"))) - util.trapErrors(callback, doc, reason); - this.unlisten(doc, true); delete doc[this.id]; diff --git a/common/skin/dactyl.css b/common/skin/dactyl.css index 53d3dc29..90ffa4d2 100644 --- a/common/skin/dactyl.css +++ b/common/skin/dactyl.css @@ -168,6 +168,11 @@ statusbarpanel { visibility: collapse; } +#nav-bar { + padding-top: 0px !important; + padding-bottom: 0px !important; +} + .dactyl-commandline-prompt { /* background-color: inherit; */ margin: 0px;