summaryrefslogtreecommitdiff
path: root/alot/widgets/bufferlist.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/widgets/bufferlist.py')
-rw-r--r--alot/widgets/bufferlist.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/alot/widgets/bufferlist.py b/alot/widgets/bufferlist.py
new file mode 100644
index 00000000..0ab315c5
--- /dev/null
+++ b/alot/widgets/bufferlist.py
@@ -0,0 +1,29 @@
+# Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com>
+# This file is released under the GNU GPL, version 3 or a later revision.
+# For further details see the COPYING file
+
+"""
+Widgets specific to Bufferlist mode
+"""
+import urwid
+
+
+class BufferlineWidget(urwid.Text):
+ """
+ selectable text widget that represents a :class:`~alot.buffers.Buffer`
+ in the :class:`~alot.buffers.BufferlistBuffer`.
+ """
+
+ def __init__(self, buffer):
+ self.buffer = buffer
+ line = buffer.__str__()
+ urwid.Text.__init__(self, line, wrap='clip')
+
+ def selectable(self):
+ return True
+
+ def keypress(self, size, key):
+ return key
+
+ def get_buffer(self):
+ return self.buffer