summaryrefslogtreecommitdiff
path: root/alot/widgets/thread.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/widgets/thread.py')
-rw-r--r--alot/widgets/thread.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/alot/widgets/thread.py b/alot/widgets/thread.py
index 1954d84d..7c423383 100644
--- a/alot/widgets/thread.py
+++ b/alot/widgets/thread.py
@@ -163,8 +163,6 @@ class MessageWidget(urwid.WidgetWrap):
"""
self._message = message
- self.display_attachments = True
-
self._headers_wgt = self._get_headers()
self._summary_wgt = MessageSummaryWidget(message, odd)
self._source_wgt = self._get_source()
@@ -329,6 +327,15 @@ class MessageWidget(urwid.WidgetWrap):
"""
self.display_content = not self._message.matches(querystring)
+ def get_selected_attachment(self):
+ """
+ If an AttachmentWidget is currently focused, return it. Otherwise return
+ None.
+ """
+ if self._w.focus is self._attach_wgt:
+ return self._attach_wgt.focus.attachment
+ return None
+
class ThreadNode(urwid.WidgetWrap):
_ARROW = '➤'
_HBAR = '─'