Added permanent (count-independent) tab hide according to perm-hide variable.

This commit is contained in:
ZDarian 2015-01-18 07:39:26 -07:00
parent 3c21d5986e
commit 52afa1a479
2 changed files with 6 additions and 1 deletions

View File

@ -360,6 +360,10 @@ DATA = collections.OrderedDict([
SettingValue(typ.Bool(), 'false'),
"Hide the tabbar if only one tab is open."),
('perm-hide',
SettingValue(typ.Bool(), 'false'),
"Hide permanently."),
('wrap',
SettingValue(typ.Bool(), 'true'),
"Whether to wrap when changing tabs."),

View File

@ -106,7 +106,8 @@ class TabBar(QTabBar):
def autohide(self):
"""Auto-hide the tabbar if needed."""
auto_hide = config.get('tabs', 'auto-hide')
if auto_hide and self.count() == 1:
perm_hide = config.get('tabs', 'perm-hide')
if perm_hide or auto_hide and self.count() == 1:
self.hide()
else:
self.show()