From 6c2b658a9aa39660b221146158ff0605413b9639 Mon Sep 17 00:00:00 2001 From: red-agent Date: Tue, 13 Oct 2009 17:38:42 +0300 Subject: [PATCH] Improved the lookup of the minimized control --- src/common/connection_handlers.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py index 5c7e2da29..dcd61a946 100644 --- a/src/common/connection_handlers.py +++ b/src/common/connection_handlers.py @@ -2277,12 +2277,12 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco, gc_control = gajim.interface.msg_win_mgr.get_gc_control(room_jid, self.name) - # 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 and \ - room_jid in gajim.interface.minimized_controls[self.name]: - gc_control = gajim.interface.minimized_controls[self.name][ - room_jid] + # If gc_control is missing - it may be minimized. Try to get it from + # there. If it's not there - then it's missing anyway and will + # remain set to None. + if gc_control is None: + minimized = gajim.interface.minimized_controls[self.name] + gc_control = minimized.get(room_jid) if errcode == '502': # Internal Timeout: