fixes #2121
This commit is contained in:
parent
e0fcaeac86
commit
f6d38cbd10
2 changed files with 0 additions and 27 deletions
|
@ -72,8 +72,6 @@ class DataFormsTab(Tab):
|
||||||
self.form_win.on_input(key)
|
self.form_win.on_input(key)
|
||||||
|
|
||||||
def resize(self):
|
def resize(self):
|
||||||
if not self.visible:
|
|
||||||
return
|
|
||||||
self.topic_win.resize(1, self.width, 0, 0)
|
self.topic_win.resize(1, self.width, 0, 0)
|
||||||
self.tab_win.resize(1, self.width, self.height-2, 0)
|
self.tab_win.resize(1, self.width, self.height-2, 0)
|
||||||
self.form_win.resize(self.height-4, self.width, 1, 0)
|
self.form_win.resize(self.height-4, self.width, 1, 0)
|
||||||
|
@ -82,8 +80,6 @@ class DataFormsTab(Tab):
|
||||||
self.lines = []
|
self.lines = []
|
||||||
|
|
||||||
def refresh(self):
|
def refresh(self):
|
||||||
if not self.visible:
|
|
||||||
return
|
|
||||||
self.topic_win.refresh(self._form['title'])
|
self.topic_win.refresh(self._form['title'])
|
||||||
self.tab_win.refresh()
|
self.tab_win.refresh()
|
||||||
self.help_win.refresh()
|
self.help_win.refresh()
|
||||||
|
|
23
src/tabs.py
23
src/tabs.py
|
@ -72,7 +72,6 @@ class Tab(object):
|
||||||
self.need_resize = False
|
self.need_resize = False
|
||||||
self.nb = Tab.number
|
self.nb = Tab.number
|
||||||
Tab.number += 1
|
Tab.number += 1
|
||||||
self.visible = True
|
|
||||||
self.need_resize = False
|
self.need_resize = False
|
||||||
self.key_func = {} # each tab should add their keys in there
|
self.key_func = {} # each tab should add their keys in there
|
||||||
# and use them in on_input
|
# and use them in on_input
|
||||||
|
@ -633,8 +632,6 @@ class MucTab(ChatTab):
|
||||||
self.input.resize(1, self.width, self.height-1, 0)
|
self.input.resize(1, self.width, self.height-1, 0)
|
||||||
|
|
||||||
def refresh(self):
|
def refresh(self):
|
||||||
if not self.visible:
|
|
||||||
return
|
|
||||||
if self.need_resize:
|
if self.need_resize:
|
||||||
self.resize()
|
self.resize()
|
||||||
log.debug(' TAB Refresh: %s'%self.__class__.__name__)
|
log.debug(' TAB Refresh: %s'%self.__class__.__name__)
|
||||||
|
@ -955,8 +952,6 @@ class PrivateTab(ChatTab):
|
||||||
self.core.close_tab()
|
self.core.close_tab()
|
||||||
|
|
||||||
def resize(self):
|
def resize(self):
|
||||||
if not self.visible:
|
|
||||||
return
|
|
||||||
if self.core.information_win_size >= self.height-3:
|
if self.core.information_win_size >= self.height-3:
|
||||||
return
|
return
|
||||||
self.text_win.resize(self.height-3-self.core.information_win_size, self.width, 0, 0)
|
self.text_win.resize(self.height-3-self.core.information_win_size, self.width, 0, 0)
|
||||||
|
@ -966,8 +961,6 @@ class PrivateTab(ChatTab):
|
||||||
self.input.resize(1, self.width, self.height-1, 0)
|
self.input.resize(1, self.width, self.height-1, 0)
|
||||||
|
|
||||||
def refresh(self):
|
def refresh(self):
|
||||||
if not self.visible:
|
|
||||||
return
|
|
||||||
if self.need_resize:
|
if self.need_resize:
|
||||||
self.resize()
|
self.resize()
|
||||||
log.debug(' TAB Refresh: %s'%self.__class__.__name__)
|
log.debug(' TAB Refresh: %s'%self.__class__.__name__)
|
||||||
|
@ -1090,8 +1083,6 @@ class RosterInfoTab(Tab):
|
||||||
self.resize()
|
self.resize()
|
||||||
|
|
||||||
def resize(self):
|
def resize(self):
|
||||||
if not self.visible:
|
|
||||||
return
|
|
||||||
roster_width = self.width//2
|
roster_width = self.width//2
|
||||||
info_width = self.width-roster_width-1
|
info_width = self.width-roster_width-1
|
||||||
self.v_separator.resize(self.height-2, 1, 0, roster_width)
|
self.v_separator.resize(self.height-2, 1, 0, roster_width)
|
||||||
|
@ -1238,8 +1229,6 @@ class RosterInfoTab(Tab):
|
||||||
self.core.xmpp.sendPresence(pto=jid, ptype='subscribe')
|
self.core.xmpp.sendPresence(pto=jid, ptype='subscribe')
|
||||||
|
|
||||||
def refresh(self):
|
def refresh(self):
|
||||||
if not self.visible:
|
|
||||||
return
|
|
||||||
if self.need_resize:
|
if self.need_resize:
|
||||||
self.resize()
|
self.resize()
|
||||||
log.debug(' TAB Refresh: %s'%self.__class__.__name__)
|
log.debug(' TAB Refresh: %s'%self.__class__.__name__)
|
||||||
|
@ -1446,8 +1435,6 @@ class ConversationTab(ChatTab):
|
||||||
self.core.close_tab()
|
self.core.close_tab()
|
||||||
|
|
||||||
def resize(self):
|
def resize(self):
|
||||||
if not self.visible:
|
|
||||||
return
|
|
||||||
if self.core.information_win_size >= self.height-3:
|
if self.core.information_win_size >= self.height-3:
|
||||||
return
|
return
|
||||||
self.text_win.resize(self.height-4-self.core.information_win_size, self.width, 1, 0)
|
self.text_win.resize(self.height-4-self.core.information_win_size, self.width, 1, 0)
|
||||||
|
@ -1458,8 +1445,6 @@ class ConversationTab(ChatTab):
|
||||||
self.input.resize(1, self.width, self.height-1, 0)
|
self.input.resize(1, self.width, self.height-1, 0)
|
||||||
|
|
||||||
def refresh(self):
|
def refresh(self):
|
||||||
if not self.visible:
|
|
||||||
return
|
|
||||||
if self.need_resize:
|
if self.need_resize:
|
||||||
self.resize()
|
self.resize()
|
||||||
log.debug(' TAB Refresh: %s'%self.__class__.__name__)
|
log.debug(' TAB Refresh: %s'%self.__class__.__name__)
|
||||||
|
@ -1561,8 +1546,6 @@ class MucListTab(Tab):
|
||||||
self.resize()
|
self.resize()
|
||||||
|
|
||||||
def refresh(self):
|
def refresh(self):
|
||||||
if not self.visible:
|
|
||||||
return
|
|
||||||
if self.need_resize:
|
if self.need_resize:
|
||||||
self.resize()
|
self.resize()
|
||||||
log.debug(' TAB Refresh: %s'%self.__class__.__name__)
|
log.debug(' TAB Refresh: %s'%self.__class__.__name__)
|
||||||
|
@ -1573,8 +1556,6 @@ class MucListTab(Tab):
|
||||||
self.input.refresh()
|
self.input.refresh()
|
||||||
|
|
||||||
def resize(self):
|
def resize(self):
|
||||||
if not self.visible:
|
|
||||||
return
|
|
||||||
self.upper_message.resize(1, self.width, 0, 0)
|
self.upper_message.resize(1, self.width, 0, 0)
|
||||||
column_size = {'node-part': (self.width-5)//4,
|
column_size = {'node-part': (self.width-5)//4,
|
||||||
'name': (self.width-5)//4*3,
|
'name': (self.width-5)//4*3,
|
||||||
|
@ -1703,15 +1684,11 @@ class SimpleTextTab(Tab):
|
||||||
self.core.close_tab()
|
self.core.close_tab()
|
||||||
|
|
||||||
def resize(self):
|
def resize(self):
|
||||||
if not self.visible:
|
|
||||||
return
|
|
||||||
self.text_win.resize(self.height-2, self.width, 0, 0)
|
self.text_win.resize(self.height-2, self.width, 0, 0)
|
||||||
self.tab_win.resize(1, self.width, self.height-2, 0)
|
self.tab_win.resize(1, self.width, self.height-2, 0)
|
||||||
self.input.resize(1, self.width, self.height-1, 0)
|
self.input.resize(1, self.width, self.height-1, 0)
|
||||||
|
|
||||||
def refresh(self):
|
def refresh(self):
|
||||||
if not self.visible:
|
|
||||||
return
|
|
||||||
if self.need_resize:
|
if self.need_resize:
|
||||||
self.resize()
|
self.resize()
|
||||||
log.debug(' TAB Refresh: %s'%self.__class__.__name__)
|
log.debug(' TAB Refresh: %s'%self.__class__.__name__)
|
||||||
|
|
Loading…
Reference in a new issue