diff options
Diffstat (limited to 'src/tabs.py')
-rw-r--r-- | src/tabs.py | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/tabs.py b/src/tabs.py index d2145d54..c336adcd 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -77,6 +77,12 @@ class Tab(object): return Tab.tab_core @property + def tab_win(self): + if not Tab.tab_core: + Tab.tab_core = singleton.Singleton(core.Core) + return Tab.tab_core.tab_win + + @property def info_win(self): return self.core.information_win @@ -381,7 +387,6 @@ class MucTab(ChatTab): self.v_separator = windows.VerticalSeparator() self.user_win = windows.UserList() self.info_header = windows.MucInfoWin() - self.tab_win = windows.GlobalInfoBar() self.input = windows.MessageInput() self.ignores = [] # set of Users # keys @@ -679,7 +684,6 @@ class MucTab(ChatTab): self.text_win.rebuild_everything(self._room) self.user_win.resize(self.height-3-self.core.information_win_size-1, self.width-text_width-1, 1, text_width+1) self.info_header.resize(1, self.width, self.height-3-self.core.information_win_size, 0) - self.tab_win.resize(1, self.width, self.height-2, 0) self.input.resize(1, self.width, self.height-1, 0) def refresh(self): @@ -981,7 +985,6 @@ class PrivateTab(ChatTab): self.text_win = windows.TextWin() room.add_window(self.text_win) self.info_header = windows.PrivateInfoWin() - self.tab_win = windows.GlobalInfoBar() self.input = windows.MessageInput() # keys self.key_func['^I'] = self.completion @@ -1026,7 +1029,6 @@ class PrivateTab(ChatTab): self.text_win.resize(self.height-3-self.core.information_win_size, self.width, 0, 0) self.text_win.rebuild_everything(self._room) self.info_header.resize(1, self.width, self.height-3-self.core.information_win_size, 0) - self.tab_win.resize(1, self.width, self.height-2, 0) self.input.resize(1, self.width, self.height-1, 0) def refresh(self): @@ -1141,7 +1143,6 @@ class RosterInfoTab(Tab): Tab.__init__(self) self.name = "Roster" self.v_separator = windows.VerticalSeparator() - self.tab_win = windows.GlobalInfoBar() self.information_win = windows.TextWin() self.core.information_buffer.add_window(self.information_win) self.roster_win = windows.RosterWin() @@ -1175,7 +1176,6 @@ class RosterInfoTab(Tab): roster_width = self.width//2 info_width = self.width-roster_width-1 self.v_separator.resize(self.height-2, 1, 0, roster_width) - self.tab_win.resize(1, self.width, self.height-2, 0) self.information_win.resize(self.height-2-4, info_width, 0, roster_width+1, self.core.information_buffer) self.roster_win.resize(self.height-2, roster_width, 0, 0) self.contact_info_win.resize(4, info_width, self.height-2-4, roster_width+1) @@ -1494,7 +1494,6 @@ class ConversationTab(ChatTab): txt_buff.add_window(self.text_win) self.upper_bar = windows.ConversationStatusMessageWin() self.info_header = windows.ConversationInfoWin() - self.tab_win = windows.GlobalInfoBar() self.input = windows.MessageInput() # keys self.key_func['^I'] = self.completion @@ -1533,7 +1532,6 @@ class ConversationTab(ChatTab): self.text_win.rebuild_everything(self._room) self.upper_bar.resize(1, self.width, 0, 0) self.info_header.resize(1, self.width, self.height-3-self.core.information_win_size, 0) - self.tab_win.resize(1, self.width, self.height-2, 0) self.input.resize(1, self.width, self.height-1, 0) def refresh(self): @@ -1622,7 +1620,6 @@ class MucListTab(Tab): columns = ('node-part', 'name', 'users') self.list_header = windows.ColumnHeaderWin(columns) self.listview = windows.ListWin(columns) - self.tab_win = windows.GlobalInfoBar() self.default_help_message = windows.HelpText("“j”: join room.") self.input = self.default_help_message self.key_func["KEY_DOWN"] = self.listview.move_cursor_down @@ -1656,7 +1653,6 @@ class MucListTab(Tab): self.list_header.resize(1, self.width, 1, 0) self.listview.resize_columns(column_size) self.listview.resize(self.height-4, self.width, 2, 0) - self.tab_win.resize(1, self.width, self.height-2, 0) self.input.resize(1, self.width, self.height-1, 0) def on_slash(self): @@ -1749,7 +1745,6 @@ class SimpleTextTab(Tab): Tab.__init__(self) self._color_state = theme.COLOR_TAB_NORMAL self.text_win = windows.SimpleTextWin(text) - self.tab_win = windows.GlobalInfoBar() self.default_help_message = windows.HelpText("“Ctrl+q”: close") self.input = self.default_help_message self.key_func['^T'] = self.close @@ -1779,7 +1774,6 @@ class SimpleTextTab(Tab): if not self.visible: return self.text_win.resize(self.height-2, self.width, 0, 0) - self.tab_win.resize(1, self.width, self.height-2, 0) self.input.resize(1, self.width, self.height-1, 0) def refresh(self): |