summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-10-02 11:44:15 +0200
committerAnton Khirnov <anton@khirnov.net>2020-01-29 19:28:22 +0100
commitc96eb5766496a050cea2f350bf5ef24b066888cd (patch)
treeac609d647d48829d87cdcbdea6d62dc29801a0cb /alot
parentb241f96a1644a366f8cef6bfd5e7a1de1d11c706 (diff)
Add message subject to the message summary widget.
Diffstat (limited to 'alot')
-rw-r--r--alot/widgets/thread.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/alot/widgets/thread.py b/alot/widgets/thread.py
index ca05ebd9..f013bded 100644
--- a/alot/widgets/thread.py
+++ b/alot/widgets/thread.py
@@ -57,9 +57,14 @@ class MessageSummaryWidget(urwid.WidgetWrap):
urwid.WidgetWrap.__init__(self, line)
def __str__(self):
+ mail = self.message.get_email()
+
+ subj = mail.get_all('subject', [''])
+ subj = ','.join([decode_header(s, normalize = True) for s in subj])
+
author, address = self.message.get_author()
date = self.message.get_datestring()
- rep = author if author != '' else address
+ rep = '%s: %s' % (author if author != '' else address, subj)
if date is not None:
rep += " (%s)" % date
return rep