1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 20:47:58 +01:00

working showtabline!

This commit is contained in:
Doug Kearns
2007-10-14 22:21:38 +00:00
parent d0b7732d82
commit 8e2271c183
2 changed files with 11 additions and 8 deletions

View File

@@ -221,20 +221,23 @@ function Options() //{{{
function setShowTabline(value)
{
// hide tabbar
var tabs = getBrowser().mStrip.getElementsByClassName("tabbrowser-tabs")[0];
if (!tabs)
return;
if (value == 0)
{
getBrowser().mStrip.collapsed = true;
getBrowser().mStrip.hidden = true;
tabs.collapsed = true;
}
else if (value == 1)
{
vimperator.echo("show tabline only with > 1 page open not implemented yet");
storePreference("browser.tabs.autoHide", true);
tabs.collapsed = false;
}
else
{
getBrowser().mStrip.collapsed = false;
getBrowser().mStrip.hidden = false;
storePreference("browser.tabs.autoHide", false);
tabs.collapsed = false;
}
}
@@ -602,8 +605,7 @@ function Options() //{{{
"<li><b>0</b>: Never show tab bar</li>" +
"<li><b>1</b>: Show tab bar only if more than one tab is open</li>" +
"<li><b>2</b>: Always show tab bar</li>" +
"</ul>" +
"NOTE: showtabline=1 not implemented yet and buggy with showtabline=0",
"</ul>",
setter: function(value) { Options.setPref("showtabline", value); setShowTabline(value); },
default_value: 2,
validator: function (value) { if (value >= 0 && value <= 2) return true; else return false; }