tab *-hide -> tab hide-*

This commit is contained in:
ZDarian 2015-01-21 20:50:30 -07:00
parent 335f72a93f
commit ef5412f596
3 changed files with 8 additions and 6 deletions

View File

@ -209,6 +209,8 @@ class ConfigManager(QObject):
('colors', 'tab.indicator.stop'): 'tabs.indicator.stop',
('colors', 'tab.indicator.error'): 'tabs.indicator.error',
('colors', 'tab.indicator.system'): 'tabs.indicator.system',
('tabs', 'always-hide'): 'hide-always',
('tabs', 'auto-hide'): 'hide-auto',
}
DELETED_OPTIONS = [
('colors', 'tab.seperator'),

View File

@ -356,11 +356,11 @@ DATA = collections.OrderedDict([
SettingValue(typ.LastClose(), 'ignore'),
"Behaviour when the last tab is closed."),
('auto-hide',
('hide-auto',
SettingValue(typ.Bool(), 'false'),
"Hide the tabbar if only one tab is open."),
('always-hide',
('hide-always',
SettingValue(typ.Bool(), 'false'),
"Always hide the tabbar."),

View File

@ -102,12 +102,12 @@ class TabBar(QTabBar):
def __repr__(self):
return utils.get_repr(self, count=self.count())
@config.change_filter('tabs', 'auto-hide')
@config.change_filter('tabs', 'hide-auto')
def autohide(self):
"""Auto-hide the tabbar if needed."""
auto_hide = config.get('tabs', 'auto-hide')
always_hide = config.get('tabs', 'always-hide')
if always_hide or auto_hide and self.count() == 1:
hide_auto = config.get('tabs', 'hide-auto')
hide_always = config.get('tabs', 'hide-always')
if hide_always or hide_auto and self.count() == 1:
self.hide()
else:
self.show()