prevent TB when closing a window. fixes #3152

This commit is contained in:
Yann Leboulanger 2007-05-07 20:18:22 +00:00
parent 3455d9e578
commit fb95530daf
1 changed files with 5 additions and 2 deletions

View File

@ -235,6 +235,11 @@ class MessageWindow:
def show_title(self, urgent = True, control = None):
'''redraw the window's title'''
if not control:
control = self.get_active_control()
if not control:
# No more control in this window
return
unread = 0
for ctrl in self.controls():
if ctrl.type_id == message_control.TYPE_GC and not \
@ -253,8 +258,6 @@ class MessageWindow:
else:
urgent = False
if not control:
control = self.get_active_control()
if control.type_id == message_control.TYPE_GC:
name = control.room_jid.split('@')[0]
urgent = control.attention_flag