mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-05 14:55:45 +01:00
Replace 'laststatus' with a 'guioptions' flag.
This commit is contained in:
@@ -811,7 +811,6 @@ const Buffer = Module("buffer", {
|
||||
* contains at least one frame.
|
||||
*
|
||||
* @param {number} count The number of frames to skip through.
|
||||
* @param {boolean} forward The direction of motion.
|
||||
*/
|
||||
shiftFrameFocus: function (count) {
|
||||
if (!(window.content.document instanceof HTMLDocument))
|
||||
@@ -829,10 +828,6 @@ const Buffer = Module("buffer", {
|
||||
rect.width && rect.height);
|
||||
|
||||
// find the currently focused frame index
|
||||
// TODO: If the window is a frameset then the first _frame_ should be
|
||||
// focused. Since this is not the current FF behavior,
|
||||
// we initialize current to -1 so the first call takes us to the
|
||||
// first frame.
|
||||
let current = Math.max(0, frames.indexOf(buffer.focusedFrame));
|
||||
|
||||
// calculate the next frame to focus
|
||||
@@ -840,7 +835,6 @@ const Buffer = Module("buffer", {
|
||||
if (next < 0 || next >= frames.length)
|
||||
dactyl.beep();
|
||||
next = Math.constrain(next, 0, frames.length - 1);
|
||||
util.dump(current, count, next, String(frames[next]));
|
||||
|
||||
// focus next frame and scroll into view
|
||||
frames[next].focus();
|
||||
|
||||
@@ -1161,7 +1161,9 @@ const Dactyl = Module("dactyl", {
|
||||
}
|
||||
},
|
||||
{
|
||||
opts: config.guioptions,
|
||||
opts: update({
|
||||
s: ["Status bar", [statusline.statusBar.id]]
|
||||
}, config.guioptions),
|
||||
setter: function (opts) {
|
||||
for (let [opt, [, ids]] in Iterator(this.opts)) {
|
||||
ids.map(function (id) document.getElementById(id))
|
||||
|
||||
@@ -274,31 +274,6 @@ const StatusLine = Module("statusline", {
|
||||
this.widgets.zoomlevel.value = " (" + percent + "%)";
|
||||
}
|
||||
}
|
||||
|
||||
}, {
|
||||
}, {
|
||||
options: function () {
|
||||
options.add(["laststatus", "ls"],
|
||||
"Show the status line",
|
||||
"number", 2,
|
||||
{
|
||||
setter: function setter(value) {
|
||||
if (value == 0)
|
||||
statusline.statusBar.collapsed = true;
|
||||
else if (value == 1)
|
||||
dactyl.echoerr("show status line only with > 1 window not implemented yet");
|
||||
else
|
||||
statusline.statusBar.collapsed = false;
|
||||
commandline.widgets.updateVisibility();
|
||||
return value;
|
||||
},
|
||||
completer: function completer(context) [
|
||||
["0", "Never display status line"],
|
||||
["1", "Display status line only if there are multiple windows"],
|
||||
["2", "Always display status line"]
|
||||
]
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
|
||||
Reference in New Issue
Block a user