summaryrefslogtreecommitdiff
path: root/alot/buffers.py
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2011-11-08 14:58:55 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2011-11-08 14:58:55 +0000
commit17ec2f78b8df1b67e439d7fa783f0d545b57c6d5 (patch)
tree57fcd1ffbf8aae339a80cf90ab60bb9b882e085d /alot/buffers.py
parent3545d8224f249d21ab91079fe7ee90fb4b7027ca (diff)
cleanup search: walker class (issue #120)
Diffstat (limited to 'alot/buffers.py')
-rw-r--r--alot/buffers.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/alot/buffers.py b/alot/buffers.py
index 5d9649ce..e5bc8ccc 100644
--- a/alot/buffers.py
+++ b/alot/buffers.py
@@ -24,7 +24,7 @@ import multiprocessing
import widgets
import settings
import commands
-from walker import IteratorWalker
+from walker import PipeWalker
from message import decode_header
@@ -168,16 +168,15 @@ class SearchBuffer(Buffer):
self.result_count = self.dbman.count_messages(self.querystring)
try:
- self.tids = self.dbman.search_thread_ids(self.querystring)
- except NotmuchError:
+ self.pipe = self.dbman.query_threaded(self.querystring)
+ except NotmuchError: #TODO: this never happens for malformed queries
self.ui.notify('malformed query string: %s' % self.querystring,
'error')
- self.tids = multiprocessing.Pipe(False)
- self.tids.put(None)
+ self.pipe = multiprocessing.Pipe(False)
+ self.pipe.put(None)
- self.threadlist = IteratorWalker(self.tids,
- widgets.ThreadlineWidget,
- dbman=self.dbman)
+ self.threadlist = PipeWalker(self.pipe, widgets.ThreadlineWidget,
+ dbman=self.dbman)
self.listbox = urwid.ListBox(self.threadlist)
#self.threadlist.set_focus(focusposition)