From 3aa6e891a5be995f39b4364f8fe525ef9db6262b Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Mon, 18 Apr 2011 03:07:28 +0200 Subject: Add some more debug and optimze the general refresh again --- src/core.py | 3 +-- src/tabs.py | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/core.py b/src/core.py index 7b3bcb62..861e9144 100644 --- a/src/core.py +++ b/src/core.py @@ -333,6 +333,7 @@ class Core(object): contact = roster.get_contact_by_jid(jid.bare) if not contact: return + log.debug('on_got_offline: %s' % presence) resource = contact.get_resource_by_fulljid(jid.full) assert resource # If a resource got offline, display the message in the conversation with this @@ -1341,8 +1342,6 @@ class Core(object): 'error roster warning help info').split(): popup_time = config.get('popup_time', 4) + (nb_lines - 1) * 2 self.pop_information_win_up(nb_lines, popup_time) - # TODO: refresh only the correct window in the current tab - self.refresh_window() def disconnect(self, msg=None): """ diff --git a/src/tabs.py b/src/tabs.py index 2061c86e..cd2d0c49 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -377,6 +377,7 @@ class InfoTab(ChatTab): return if self.need_resize: self.resize() + log.debug(' TAB Refresh: %s'%self.__class__.__name__) self.info_win.refresh(self.core.informations) self.tab_win.refresh() self.input.refresh() @@ -680,6 +681,7 @@ class MucTab(ChatTab): return if self.need_resize: self.resize() + log.debug(' TAB Refresh: %s'%self.__class__.__name__) self.topic_win.refresh(self._room.topic) self.text_win.refresh(self._room) self.v_separator.refresh() @@ -1013,6 +1015,7 @@ class PrivateTab(ChatTab): return if self.need_resize: self.resize() + log.debug(' TAB Refresh: %s'%self.__class__.__name__) self.text_win.refresh(self._room) self.info_header.refresh(self._room, self.text_win, self.chatstate) self.info_win.refresh(self.core.informations) @@ -1233,6 +1236,7 @@ class RosterInfoTab(Tab): return if self.need_resize: self.resize() + log.debug(' TAB Refresh: %s'%self.__class__.__name__) self.v_separator.refresh() self.roster_win.refresh(roster) self.contact_info_win.refresh(self.roster_win.get_selected_row()) @@ -1455,6 +1459,7 @@ class ConversationTab(ChatTab): return if self.need_resize: self.resize() + log.debug(' TAB Refresh: %s'%self.__class__.__name__) self.text_win.refresh(self._room) self.upper_bar.refresh(self.get_name(), roster.get_contact_by_jid(self.get_name())) self.info_header.refresh(self.get_name(), roster.get_contact_by_jid(self.get_name()), self._room, self.text_win, self.chatstate) @@ -1559,6 +1564,7 @@ class MucListTab(Tab): return if self.need_resize: self.resize() + log.debug(' TAB Refresh: %s'%self.__class__.__name__) self.upper_message.refresh() self.list_header.refresh() self.listview.refresh() @@ -1707,6 +1713,7 @@ class SimpleTextTab(Tab): return if self.need_resize: self.resize() + log.debug(' TAB Refresh: %s'%self.__class__.__name__) self.text_win.refresh() self.tab_win.refresh() self.input.refresh() -- cgit v1.2.3