From 970aa8c848ef8bc2fa17f1b2435444230b08f465 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 13 Oct 2009 07:53:05 +0200 Subject: [PATCH] fix look in minimized_controls --- src/common/connection_handlers.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py index 0378c3ae4..0ae68e6c8 100644 --- a/src/common/connection_handlers.py +++ b/src/common/connection_handlers.py @@ -2279,14 +2279,9 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco, # gc_control might be in the other place if it's minimized. Note: # this solution might have an impact on the performance. - if gc_control is None: - for control in gajim.interface.minimized_controls[self.name]: - # Using here this hack instead of isinstance() to avoid risk - # of cycle import when trying to import GroupchatControl from - # groupchat_control.py - if control.__class__.__name__ == 'GroupchatControl' and \ - control.room_jid == room_jid: - gc_control = control + if gc_control is None and \ + room_jid in gajim.interface.minimized_controls[self.name]: + gc_control = control if errcode == '502': # Internal Timeout: