summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpazz <patricktotzke@gmail.com>2011-07-30 16:20:11 +0100
committerpazz <patricktotzke@gmail.com>2011-07-30 16:20:11 +0100
commit5674e56cdd365457c690618c86a074b1becabfcb (patch)
treeecb744e6c6f20f3416473ed7e060275a1cdb122c
parent02bf1ba67a3b703116d6442906a4bcd973b14b2d (diff)
renamed SingleThread and BufferList Buffer classes
-rw-r--r--alot/buffer.py6
-rw-r--r--alot/command.py12
-rw-r--r--alot/completion.py5
-rw-r--r--alot/ui.py4
4 files changed, 13 insertions, 14 deletions
diff --git a/alot/buffer.py b/alot/buffer.py
index b0bbf713..4d9cc3f0 100644
--- a/alot/buffer.py
+++ b/alot/buffer.py
@@ -51,7 +51,7 @@ class Buffer:
return self.body.keypress(size, key)
-class BufferListBuffer(Buffer):
+class BufferlistBuffer(Buffer):
def __init__(self, ui, filtfun=None):
self.filtfun = filtfun
self.ui = ui
@@ -166,8 +166,8 @@ class SearchBuffer(Buffer):
thread = threadlinewidget.get_thread()
return thread
-#rename thread
-class SingleThreadBuffer(Buffer):
+
+class ThreadBuffer(Buffer):
def __init__(self, ui, thread):
self.message_count = thread.get_total_messages()
self.thread = thread
diff --git a/alot/command.py b/alot/command.py
index 0d760964..6936551f 100644
--- a/alot/command.py
+++ b/alot/command.py
@@ -75,7 +75,7 @@ class OpenThreadCommand(Command):
ui.apply_command(FlushCommand())
self.thread.refresh()
- sb = buffer.SingleThreadBuffer(ui, self.thread)
+ sb = buffer.ThreadBuffer(ui, self.thread)
ui.buffer_open(sb)
@@ -240,7 +240,7 @@ class BufferFocusCommand(Command):
ui.buffer_focus(self.buffer)
-class OpenBufferListCommand(Command):
+class OpenBufferlistCommand(Command):
"""
open a bufferlist
"""
@@ -249,11 +249,11 @@ class OpenBufferListCommand(Command):
Command.__init__(self, **kwargs)
def apply(self, ui):
- blists = ui.get_buffers_of_type(buffer.BufferListBuffer)
+ blists = ui.get_buffers_of_type(buffer.BufferlistBuffer)
if blists:
ui.buffer_focus(blists[0])
else:
- ui.buffer_open(buffer.BufferListBuffer(ui, self.filtfun))
+ ui.buffer_open(buffer.BufferlistBuffer(ui, self.filtfun))
class TagListCommand(Command):
@@ -337,7 +337,7 @@ class ToggleThreadTagCommand(Command):
cb.threadlist.remove(threadwidget)
cb.result_count -= self.thread.get_total_messages()
ui.update()
- elif isinstance(cb, buffer.SingleThreadBuffer):
+ elif isinstance(cb, buffer.ThreadBuffer):
pass
@@ -671,7 +671,7 @@ class TaglistSelectCommand(Command):
COMMANDS = {
'bnext': (BufferFocusCommand, {'offset': 1}),
'bprevious': (BufferFocusCommand, {'offset': -1}),
- 'bufferlist': (OpenBufferListCommand, {}),
+ 'bufferlist': (OpenBufferlistCommand, {}),
'close': (BufferCloseCommand, {}),
'closefocussed': (BufferCloseCommand, {'focussed': True}),
'openfocussed': (BufferFocusCommand, {}),
diff --git a/alot/completion.py b/alot/completion.py
index 6f8d43e9..c0a49d39 100644
--- a/alot/completion.py
+++ b/alot/completion.py
@@ -19,8 +19,7 @@ Copyright (C) 2011 Patrick Totzke <patricktotzke@gmail.com>
import re
-import commandfactory
-import settings
+import command
class Completer:
@@ -102,7 +101,7 @@ class CommandCompleter(Completer):
def complete(self, original):
#TODO refine <tab> should get current querystring
- cmdlist = commandfactory.ALLOWED_COMMANDS[self.mode]
+ cmdlist = command.ALLOWED_COMMANDS[self.mode]
olen = len(original)
return [t[olen:] + '' for t in cmdlist if t.startswith(original)]
diff --git a/alot/ui.py b/alot/ui.py
index 26de641f..64336318 100644
--- a/alot/ui.py
+++ b/alot/ui.py
@@ -22,7 +22,7 @@ from urwid.command_map import command_map
from settings import config
from settings import get_mapping
-from buffer import BufferListBuffer
+from buffer import BufferlistBuffer
from command import commandfactory
from command import interpret_commandline
from widgets import CompleteEdit
@@ -157,7 +157,7 @@ class UI:
else:
self.current_buffer = buf
self.mode = buf.typename
- if isinstance(self.current_buffer, BufferListBuffer):
+ if isinstance(self.current_buffer, BufferlistBuffer):
self.current_buffer.rebuild()
self.update()