summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-12-15 16:10:53 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-12-15 16:10:53 +0000
commitff24960b6aac02e85189ac8c6ee6b042f6c84258 (patch)
treeaac37878103e3cf994da32b29e7817fd5c0ae1f8 /src
parent0db8bf7d461e1d618ae7efb2f00dc2d99ddf7ca3 (diff)
downloadpoezio-ff24960b6aac02e85189ac8c6ee6b042f6c84258.tar.gz
poezio-ff24960b6aac02e85189ac8c6ee6b042f6c84258.tar.bz2
poezio-ff24960b6aac02e85189ac8c6ee6b042f6c84258.tar.xz
poezio-ff24960b6aac02e85189ac8c6ee6b042f6c84258.zip
fix the ---- that I just broke
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py12
-rw-r--r--src/text_buffer.py14
-rw-r--r--src/windows.py14
3 files changed, 20 insertions, 20 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 9f78a708..5f851cc6 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -545,8 +545,8 @@ class MucTab(ChatTab):
def on_lose_focus(self):
self._room.set_color_state(theme.COLOR_TAB_NORMAL)
- self._room.remove_line_separator()
- self._room.add_line_separator()
+ self.text_win.remove_line_separator()
+ self.text_win.add_line_separator()
def on_gain_focus(self):
self._room.set_color_state(theme.COLOR_TAB_CURRENT)
@@ -643,8 +643,8 @@ class PrivateTab(ChatTab):
def on_lose_focus(self):
self._room.set_color_state(theme.COLOR_TAB_NORMAL)
- self._room.remove_line_separator()
- self._room.add_line_separator()
+ self.text_win.remove_line_separator()
+ self.text_win.add_line_separator()
def on_gain_focus(self):
self._room.set_color_state(theme.COLOR_TAB_CURRENT)
@@ -918,8 +918,8 @@ class ConversationTab(ChatTab):
def on_lose_focus(self):
self.set_color_state(theme.COLOR_TAB_NORMAL)
- self._room.remove_line_separator()
- self._room.add_line_separator()
+ self.text_win.remove_line_separator()
+ self.text_win.add_line_separator()
def on_gain_focus(self):
self.set_color_state(theme.COLOR_TAB_CURRENT)
diff --git a/src/text_buffer.py b/src/text_buffer.py
index 32c6f725..1b11c67b 100644
--- a/src/text_buffer.py
+++ b/src/text_buffer.py
@@ -56,17 +56,3 @@ class TextBuffer(object):
nb = window.build_new_message(msg)
if window.pos != 0:
window.scroll_up(nb)
-
- def remove_line_separator(self):
- """
- Remove the line separator
- """
- if None in self.messages:
- self.messages.remove(None)
-
- def add_line_separator(self):
- """
- add a line separator at the end of messages list
- """
- if None not in self.messages:
- self.messages.append(None)
diff --git a/src/windows.py b/src/windows.py
index 13383536..7c87c59b 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -415,6 +415,20 @@ class TextWin(Win):
if self.pos <= 0:
self.pos = 0
+ def remove_line_separator(self):
+ """
+ Remove the line separator
+ """
+ if None in self.built_lines:
+ self.built_lines.remove(None)
+
+ def add_line_separator(self):
+ """
+ add a line separator at the end of messages list
+ """
+ if None not in self.built_lines:
+ self.built_lines.append(None)
+
def build_new_message(self, message):
"""
Take one message, build it and add it to the list