diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2014-04-17 17:24:16 +0200 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2014-04-17 17:24:16 +0200 |
commit | fa4ddf000dc2ac4933852b210901b649634a5f86 (patch) | |
tree | 1cc4e4d5ae8d6e6a9eacac0ddb48b704b31b6a8b | |
parent | b054d0de87801c681627ca2ff95c1ce143ba7bc1 (diff) | |
parent | 15f06bc068e973c49a9fb1148a15f07508349676 (diff) |
Merge branch '0.3.5-cleanup-message-content-701'
-rw-r--r-- | alot/widgets/thread.py | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/alot/widgets/thread.py b/alot/widgets/thread.py index 32229d2e..361ff28f 100644 --- a/alot/widgets/thread.py +++ b/alot/widgets/thread.py @@ -68,18 +68,6 @@ class MessageSummaryWidget(urwid.WidgetWrap): return key -class MessageBodyWidget(urwid.AttrMap): - """ - displays printable parts of an email - """ - - def __init__(self, message): - self._message = message - bodytxt = extract_body(message.get_email()) - att = settings.get_theming_attribute('thread', 'body') - urwid.AttrMap.__init__(self, urwid.Text(bodytxt), att) - - class FocusableText(urwid.WidgetWrap): """Selectable Text used for nodes in our example""" def __init__(self, txt, att, att_focus): @@ -247,6 +235,13 @@ class MessageTree(CollapsibleTree): self._bodytree = TextlinesList(bodytxt, att, att_focus) return self._bodytree + def replace_bodytext(self, txt): + """display txt instead of current msg 'body'""" + if txt: + att = settings.get_theming_attribute('thread', 'body') + att_focus = settings.get_theming_attribute('thread', 'body_focus') + self._bodytree = TextlinesList(txt, att, att_focus) + def _get_headers(self): if self.display_all_headers is True: if self._all_headers_tree is None: |