summaryrefslogtreecommitdiff
path: root/alot/settings
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2012-07-16 22:18:33 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2012-07-16 22:18:33 +0100
commitc80a0d3c3bee504c611b563e87987cabc509489c (patch)
tree82864d2d06ab1eac6ce4374f0a64e02b496f0508 /alot/settings
parent882705ba0173a1dca453130c0355be6481f27b6a (diff)
remove 'hidden' tag representation option
this makes hiding tags possible simply by making their 'translated' value the empty string. Note that this still sets the TagWidget.hidden property because those may not be displayed with width 0 (as any other widget) because it'd break urwid.
Diffstat (limited to 'alot/settings')
-rw-r--r--alot/settings/__init__.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/alot/settings/__init__.py b/alot/settings/__init__.py
index 60cf5c50..faae8904 100644
--- a/alot/settings/__init__.py
+++ b/alot/settings/__init__.py
@@ -261,7 +261,6 @@ class SettingsManager(object):
:normal: to :class:`urwid.AttrSpec` used if unfocussed
:focussed: to :class:`urwid.AttrSpec` used if focussed
:translated: to an alternative string representation
- :hidden: to a boolean
"""
colourmode = int(self._config.get('colourmode'))
theme = self._theme
@@ -306,9 +305,9 @@ class SettingsManager(object):
focus = resolve_att(colourpick(cfg['tags'][sec]['focus']),
fallback_focus)
- hidden = cfg['tags'][sec]['hidden'] or False
-
- translated = cfg['tags'][sec]['translated'] or tag
+ translated = cfg['tags'][sec]['translated']
+ if translated is None:
+ translated = tag
translation = cfg['tags'][sec]['translation']
if translation:
translated = re.sub(translation[0], translation[1], tag)
@@ -316,11 +315,9 @@ class SettingsManager(object):
else:
normal = fallback_normal
focus = fallback_focus
- hidden = False
translated = tag
- return {'normal': normal, 'focussed': focus,
- 'hidden': hidden, 'translated': translated}
+ return {'normal': normal, 'focussed': focus, 'translated': translated}
def get_hook(self, key):
"""return hook (`callable`) identified by `key`"""