diff options
-rw-r--r-- | alot/buffers.py | 2 | ||||
-rw-r--r-- | alot/settings/__init__.py | 11 | ||||
-rw-r--r-- | alot/widgets.py | 2 |
3 files changed, 6 insertions, 9 deletions
diff --git a/alot/buffers.py b/alot/buffers.py index 45c09df8..866e1491 100644 --- a/alot/buffers.py +++ b/alot/buffers.py @@ -395,7 +395,7 @@ class TagListBuffer(Buffer): tw = widgets.TagWidget(b, attr, focus_att) rows = [('fixed', tw.width(), tw)] if tw.hidden: - rows.append(urwid.Text('[hidden]')) + rows.append(urwid.Text(b + ' [hidden]')) elif tw.translated is not b: rows.append(urwid.Text('(%s)' % b)) line = urwid.Columns(rows, dividechars=1) 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`""" diff --git a/alot/widgets.py b/alot/widgets.py index b3223ad8..278d31e4 100644 --- a/alot/widgets.py +++ b/alot/widgets.py @@ -293,8 +293,8 @@ class TagWidget(urwid.AttrMap): representation = settings.get_tagstring_representation(tag, fallback_normal, fallback_focus) - self.hidden = representation['hidden'] self.translated = representation['translated'] + self.hidden = self.translated == '' self.txt = urwid.Text(self.translated, wrap='clip') normal_att = representation['normal'] focus_att = representation['focussed'] |