fix the ---- that I just broke
This commit is contained in:
parent
0db8bf7d46
commit
ff24960b6a
3 changed files with 20 additions and 20 deletions
12
src/tabs.py
12
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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue