summaryrefslogtreecommitdiff
path: root/src/tabs.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/tabs.py')
-rw-r--r--src/tabs.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 6c819138..3a93f541 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -680,6 +680,7 @@ class MucTab(ChatTab):
"""
if not self.visible:
return
+ self.need_resize = False
text_width = (self.width//10)*9
self.topic_win.resize(1, self.width, 0, 0)
self.v_separator.resize(self.height-3, 1, 1, 9*(self.width//10))
@@ -1035,6 +1036,7 @@ class PrivateTab(ChatTab):
def resize(self):
if self.core.information_win_size >= self.height-3 or not self.visible:
return
+ self.need_resize = False
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)
@@ -1123,22 +1125,24 @@ 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':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':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':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':theme.CHAR_JOIN})
+ if self.core.current_tab() is self:
+ self.refresh()
+ self.core.doupdate()
def activate(self):
self.on = True
@@ -1184,6 +1188,7 @@ class RosterInfoTab(Tab):
def resize(self):
if not self.visible:
return
+ self.need_resize = False
roster_width = self.width//2
info_width = self.width-roster_width-1
self.v_separator.resize(self.height-2, 1, 0, roster_width)
@@ -1540,6 +1545,7 @@ class ConversationTab(ChatTab):
def resize(self):
if self.core.information_win_size >= self.height-3 or not self.visible:
return
+ self.need_resize = False
self.text_win.resize(self.height-4-self.core.information_win_size, self.width, 1, 0)
self.text_win.rebuild_everything(self._room)
self.upper_bar.resize(1, self.width, 0, 0)
@@ -1657,6 +1663,7 @@ class MucListTab(Tab):
def resize(self):
if not self.visible:
return
+ self.need_resize = False
self.upper_message.resize(1, self.width, 0, 0)
column_size = {'node-part': (self.width-5)//4,
'name': (self.width-5)//4*3,
@@ -1791,6 +1798,7 @@ class SimpleTextTab(Tab):
def resize(self):
if not self.visible:
return
+ self.need_resize = False
self.text_win.resize(self.height-2, self.width, 0, 0)
self.input.resize(1, self.width, self.height-1, 0)