diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-02-13 22:26:23 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-02-13 22:26:23 +0100 |
commit | 8d0ebdfc123890048f7d282077c4e3ab0b845bba (patch) | |
tree | 6aac9e94c46d256a6ebda11024868fadaccc430e /src/text_buffer.py | |
parent | 1a058c3579fe31e82f5370ff6fee629375dbbb2b (diff) | |
parent | ac99467965ba04282b6dbc63c5c04ab91ba1b007 (diff) | |
download | poezio-8d0ebdfc123890048f7d282077c4e3ab0b845bba.tar.gz poezio-8d0ebdfc123890048f7d282077c4e3ab0b845bba.tar.bz2 poezio-8d0ebdfc123890048f7d282077c4e3ab0b845bba.tar.xz poezio-8d0ebdfc123890048f7d282077c4e3ab0b845bba.zip |
Automated merge with http://hg.louiz.org/poezio
Diffstat (limited to 'src/text_buffer.py')
-rw-r--r-- | src/text_buffer.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/text_buffer.py b/src/text_buffer.py index 828b344c..9285a433 100644 --- a/src/text_buffer.py +++ b/src/text_buffer.py @@ -36,7 +36,7 @@ class TextBuffer(object): self.messages = [] # Message objects self.windows = [] # we keep track of one or more windows # so we can pass the new messages to them, as they are added, so - # they (the windows) can built the lines from the new message + # they (the windows) can build the lines from the new message def add_window(self, win): self.windows.append(win) @@ -55,3 +55,8 @@ class TextBuffer(object): if window.pos != 0: window.scroll_up(nb) + def del_window(self, win): + self.windows.remove(win) + + def __del__(self): + log.debug('** Deleting %s messages from textbuffer' % (len(self.messages))) |