diff options
-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: |