do not redraw_tab too much if not needed
This commit is contained in:
parent
d7a6734601
commit
9e15e4bcab
|
@ -797,8 +797,7 @@ class ChatControlBase(MessageControl):
|
||||||
types = type_):
|
types = type_):
|
||||||
# There were events to remove
|
# There were events to remove
|
||||||
self.redraw_after_event_removed(jid)
|
self.redraw_after_event_removed(jid)
|
||||||
# Note, we send None chatstate to preserve current
|
|
||||||
self.parent_win.redraw_tab(self)
|
|
||||||
|
|
||||||
def bring_scroll_to_end(self, textview, diff_y = 0):
|
def bring_scroll_to_end(self, textview, diff_y = 0):
|
||||||
''' scrolls to the end of textview if end is not visible '''
|
''' scrolls to the end of textview if end is not visible '''
|
||||||
|
|
|
@ -845,6 +845,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
ChatControlBase.got_connected(self)
|
ChatControlBase.got_connected(self)
|
||||||
# We don't redraw the whole banner here, because only icon change
|
# We don't redraw the whole banner here, because only icon change
|
||||||
self._update_banner_state_image()
|
self._update_banner_state_image()
|
||||||
|
self.parent_win.redraw_tab(self)
|
||||||
|
|
||||||
def got_disconnected(self):
|
def got_disconnected(self):
|
||||||
self.list_treeview.get_model().clear()
|
self.list_treeview.get_model().clear()
|
||||||
|
@ -866,6 +867,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
ChatControlBase.got_disconnected(self)
|
ChatControlBase.got_disconnected(self)
|
||||||
# We don't redraw the whole banner here, because only icon change
|
# We don't redraw the whole banner here, because only icon change
|
||||||
self._update_banner_state_image()
|
self._update_banner_state_image()
|
||||||
|
self.parent_win.redraw_tab(self)
|
||||||
|
|
||||||
def draw_roster(self):
|
def draw_roster(self):
|
||||||
self.list_treeview.get_model().clear()
|
self.list_treeview.get_model().clear()
|
||||||
|
@ -1133,8 +1135,6 @@ class GroupchatControl(ChatControlBase):
|
||||||
gc_c.affiliation = affiliation
|
gc_c.affiliation = affiliation
|
||||||
gc_c.status = status
|
gc_c.status = status
|
||||||
self.draw_contact(nick)
|
self.draw_contact(nick)
|
||||||
if self.parent_win:
|
|
||||||
self.parent_win.redraw_tab(self)
|
|
||||||
if (time.time() - self.room_creation) > 30 and \
|
if (time.time() - self.room_creation) > 30 and \
|
||||||
nick != self.nick and (not statusCode or \
|
nick != self.nick and (not statusCode or \
|
||||||
'303' not in statusCode):
|
'303' not in statusCode):
|
||||||
|
|
Loading…
Reference in New Issue