From fb95530daf44594e70bc3920729f28b93975bacd Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 7 May 2007 20:18:22 +0000 Subject: [PATCH] prevent TB when closing a window. fixes #3152 --- src/message_window.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/message_window.py b/src/message_window.py index 4d3d51a2b..6445495be 100644 --- a/src/message_window.py +++ b/src/message_window.py @@ -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