diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2014-04-17 17:12:24 +0200 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2014-04-17 17:12:24 +0200 |
commit | 15f06bc068e973c49a9fb1148a15f07508349676 (patch) | |
tree | 1cc4e4d5ae8d6e6a9eacac0ddb48b704b31b6a8b /alot | |
parent | 4da3570aded25cbafa6540df99bebcb1049a3cfc (diff) |
add MessageTree.replace_bodytext
that will make the message widget display the given text instead
of the message's body text
Diffstat (limited to 'alot')
-rw-r--r-- | alot/widgets/thread.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/alot/widgets/thread.py b/alot/widgets/thread.py index 876dc612..361ff28f 100644 --- a/alot/widgets/thread.py +++ b/alot/widgets/thread.py @@ -235,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: |