diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-09-25 19:36:08 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-09-25 19:36:08 +0200 |
commit | d5a013dd6a35cce610add92767335e0daafc3f9c (patch) | |
tree | 1e62187b5dc97b9fee8ed097abd1feedc85d180e | |
parent | 24dda3ff25603f81a178cc157dd002d5d7f3feda (diff) | |
download | poezio-d5a013dd6a35cce610add92767335e0daafc3f9c.tar.gz poezio-d5a013dd6a35cce610add92767335e0daafc3f9c.tar.bz2 poezio-d5a013dd6a35cce610add92767335e0daafc3f9c.tar.xz poezio-d5a013dd6a35cce610add92767335e0daafc3f9c.zip |
Fixes the refresh issue when the user of a private conversation leaves/joins
-rw-r--r-- | src/tabs.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/tabs.py b/src/tabs.py index f46087fd..f25006a8 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -1151,22 +1151,25 @@ class PrivateTab(ChatTab): """ The user left the associated MUC """ + self.deactivate() if not status_message: self.get_room().add_message(_('\x191}%(spec)s \x193}%(nick)s\x195} has left the room') % {'nick':from_nick.replace('"', '\\"'), 'spec':get_theme().CHAR_QUIT.replace('"', '\\"')}) else: self.get_room().add_message(_('\x191}%(spec)s \x193}%(nick)s\x195} has left the room (%(status)s)"') % {'nick':from_nick.replace('"', '\\"'), 'spec':get_theme().CHAR_QUIT, 'status': status_message.replace('"', '\\"')}) - self.deactivate() - self.refresh() - self.core.doupdate() + if self.core.current_tab() is self: + self.refresh() + self.core.doupdate() def user_rejoined(self, nick): """ The user (or at least someone with the same nick) came back in the MUC """ - self.get_room().add_message('\x194}%(spec)s \x193}%(nick)s\x195} joined the room' % {'nick':nick, 'spec':get_theme().CHAR_JOIN}) self.activate() - self.refresh() - self.core.doupdate() + self.get_room().add_message('\x194}%(spec)s \x193}%(nick)s\x195} joined the room' % {'nick':nick, 'spec':get_theme().CHAR_JOIN}) + if self.core.current_tab() is self: + self.refresh() + self.core.doupdate() + def activate(self): self.on = True |