mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 09:27:58 +01:00
Make the status bar properly customizable and remove some useless vertical space in the navbar.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2008-2013 Kris Maglione <maglione.k at Gmail>
|
// Copyright (c) 2008-2014 Kris Maglione <maglione.k at Gmail>
|
||||||
//
|
//
|
||||||
// This work is licensed for reuse under an MIT license. Details are
|
// This work is licensed for reuse under an MIT license. Details are
|
||||||
// given in the LICENSE.txt file included with this file.
|
// 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);
|
this.timer = services.Timer(this, options["timeoutlen"], services.Timer.TYPE_ONE_SHOT);
|
||||||
}
|
}
|
||||||
else if (result !== Events.KILL && !this.actions.length &&
|
else if (result !== Events.KILL && !this.actions.length &&
|
||||||
!(this.events[0].isReplay || this.passUnknown
|
!(this.events[0].isReplay || this.passUnknown ||
|
||||||
|| this.modes.some(function (m) m.passEvent(this), this.events[0]))) {
|
this.modes.some(function (m) m.passEvent(this), this.events[0]))) {
|
||||||
// No patching processors, this isn't a fake, pass-through
|
// No patching processors, this isn't a fake, pass-through
|
||||||
// event, we're not in pass-through mode, and we're not
|
// event, we're not in pass-through mode, and we're not
|
||||||
// choosing to pass unknown keys. Kill the event and beep.
|
// choosing to pass unknown keys. Kill the event and beep.
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ var StatusLine = Module("statusline", {
|
|||||||
append: [
|
append: [
|
||||||
["vbox", { id: "browser-bottombox", xmlns: "xul" },
|
["vbox", { id: "browser-bottombox", xmlns: "xul" },
|
||||||
["toolbar", { id: "dactyl-addon-bar",
|
["toolbar", { id: "dactyl-addon-bar",
|
||||||
|
customizable: true,
|
||||||
|
defaultset: "",
|
||||||
|
toolboxid: "navigator-toolbox",
|
||||||
toolbarname: /*L*/ "Add-on Bar",
|
toolbarname: /*L*/ "Add-on Bar",
|
||||||
class: "toolbar-primary chromeclass-toolbar",
|
class: "toolbar-primary chromeclass-toolbar",
|
||||||
mode: "icons",
|
mode: "icons",
|
||||||
@@ -55,7 +58,7 @@ var StatusLine = Module("statusline", {
|
|||||||
-moz-appearance: none !important;
|
-moz-appearance: none !important;
|
||||||
<padding>
|
<padding>
|
||||||
}
|
}
|
||||||
!AddonButton;:-moz-any(#addon-bar, #dactyl-addon-bar) xul|toolbarbutton {
|
!AddonButton;,:-moz-any(#addon-bar, #dactyl-addon-bar) xul|toolbarbutton {
|
||||||
-moz-appearance: none !important;
|
-moz-appearance: none !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
border-width: 0px !important;
|
border-width: 0px !important;
|
||||||
@@ -117,6 +120,13 @@ var StatusLine = Module("statusline", {
|
|||||||
catch (e) {}
|
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,
|
get visible() !this.statusBar.collapsed && !this.statusBar.hidden,
|
||||||
|
|
||||||
signals: {
|
signals: {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2008-2013 Kris Maglione <maglione.k at Gmail>
|
// Copyright (c) 2008-2014 Kris Maglione <maglione.k at Gmail>
|
||||||
//
|
//
|
||||||
// This work is licensed for reuse under an MIT license. Details are
|
// This work is licensed for reuse under an MIT license. Details are
|
||||||
// given in the LICENSE.txt file included with this file.
|
// given in the LICENSE.txt file included with this file.
|
||||||
@@ -125,7 +125,7 @@ var Highlights = Module("Highlight", {
|
|||||||
if (/^[[>+: ]/.test(args[1]))
|
if (/^[[>+: ]/.test(args[1]))
|
||||||
obj.selector = this.selector(obj.class) + args[1];
|
obj.selector = this.selector(obj.class) + args[1];
|
||||||
else if (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)
|
if (old && old.value != old.defaultValue)
|
||||||
obj.value = old.value;
|
obj.value = old.value;
|
||||||
|
|||||||
@@ -113,6 +113,9 @@ var Overlay = Module("Overlay", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReferen
|
|||||||
|
|
||||||
cleanup: function cleanup(reason) {
|
cleanup: function cleanup(reason) {
|
||||||
for (let doc in util.iterDocuments()) {
|
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")))
|
for (let elem in values(this.getData(doc, "overlayElements")))
|
||||||
if (elem.parentNode)
|
if (elem.parentNode)
|
||||||
elem.parentNode.removeChild(elem);
|
elem.parentNode.removeChild(elem);
|
||||||
@@ -121,9 +124,6 @@ var Overlay = Module("Overlay", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReferen
|
|||||||
if (getAttr(elem, ns, name) === value)
|
if (getAttr(elem, ns, name) === value)
|
||||||
setAttr(elem, ns, name, orig);
|
setAttr(elem, ns, name, orig);
|
||||||
|
|
||||||
for (let callback in values(this.getData(doc, "cleanup")))
|
|
||||||
util.trapErrors(callback, doc, reason);
|
|
||||||
|
|
||||||
this.unlisten(doc, true);
|
this.unlisten(doc, true);
|
||||||
|
|
||||||
delete doc[this.id];
|
delete doc[this.id];
|
||||||
|
|||||||
@@ -168,6 +168,11 @@ statusbarpanel {
|
|||||||
visibility: collapse;
|
visibility: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#nav-bar {
|
||||||
|
padding-top: 0px !important;
|
||||||
|
padding-bottom: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.dactyl-commandline-prompt {
|
.dactyl-commandline-prompt {
|
||||||
/* background-color: inherit; */
|
/* background-color: inherit; */
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
|
|||||||
Reference in New Issue
Block a user