Commit d3863fad authored by mathieui's avatar mathieui

ChatTab: make set text_win in constructor (typing)

parent 4210f5c7
......@@ -495,9 +495,10 @@ class ChatTab(Tab):
self.last_stanza_id = None
self._name = jid.full # type: Optional[str]
self.text_win = None
self.text_win = windows.TextWin()
self.directed_presence = None
self._text_buffer = TextBuffer()
self._text_buffer.add_window(self.text_win)
self.chatstate = None # can be "active", "composing", "paused", "gone", "inactive"
# We keep a reference of the event that will set our chatstate to "paused", so that
# we can delete it or change it if we need to
......
......@@ -48,8 +48,6 @@ class ConversationTab(OneToOneTab):
self.nick = None
self.nick_sent = False
self.state = 'normal'
self.text_win = windows.TextWin()
self._text_buffer.add_window(self.text_win)
self.upper_bar = windows.ConversationStatusMessageWin()
self.input = windows.MessageInput()
# keys
......
......@@ -91,8 +91,6 @@ class MucTab(ChatTab):
self.self_ping_event = None
# UI stuff
self.topic_win = windows.Topic()
self.text_win = windows.TextWin()
self._text_buffer.add_window(self.text_win)
self.v_separator = windows.VerticalSeparator()
self.user_win = windows.UserList()
self.info_header = windows.MucInfoWin()
......
......@@ -46,8 +46,6 @@ class PrivateTab(OneToOneTab):
def __init__(self, core, jid, nick):
OneToOneTab.__init__(self, core, jid)
self.own_nick = nick
self.text_win = windows.TextWin()
self._text_buffer.add_window(self.text_win)
self.info_header = windows.PrivateInfoWin()
self.input = windows.MessageInput()
# keys
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment