diff options
author | mathieui <mathieui@mathieui.net> | 2020-05-22 18:01:32 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2020-05-23 16:13:44 +0200 |
commit | d3863fad18cd7e6b3e764b663724718401c84bde (patch) | |
tree | e701e77dcb63775c5bf1c3174c67da5d6159e08a | |
parent | 4210f5c776dab2439cecb1e19dc3997109cab400 (diff) | |
download | poezio-d3863fad18cd7e6b3e764b663724718401c84bde.tar.gz poezio-d3863fad18cd7e6b3e764b663724718401c84bde.tar.bz2 poezio-d3863fad18cd7e6b3e764b663724718401c84bde.tar.xz poezio-d3863fad18cd7e6b3e764b663724718401c84bde.zip |
ChatTab: make set text_win in constructor (typing)
-rw-r--r-- | poezio/tabs/basetabs.py | 3 | ||||
-rw-r--r-- | poezio/tabs/conversationtab.py | 2 | ||||
-rw-r--r-- | poezio/tabs/muctab.py | 2 | ||||
-rw-r--r-- | poezio/tabs/privatetab.py | 2 |
4 files changed, 2 insertions, 7 deletions
diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py index 490363f0..df2387dd 100644 --- a/poezio/tabs/basetabs.py +++ b/poezio/tabs/basetabs.py @@ -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 diff --git a/poezio/tabs/conversationtab.py b/poezio/tabs/conversationtab.py index 70005f0f..5950e4cb 100644 --- a/poezio/tabs/conversationtab.py +++ b/poezio/tabs/conversationtab.py @@ -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 diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py index 5939db31..751509a7 100644 --- a/poezio/tabs/muctab.py +++ b/poezio/tabs/muctab.py @@ -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() diff --git a/poezio/tabs/privatetab.py b/poezio/tabs/privatetab.py index b43294a1..cd2123f3 100644 --- a/poezio/tabs/privatetab.py +++ b/poezio/tabs/privatetab.py @@ -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 |