From 8f9f2bf276d184d7e995476755719eb801c24f1d Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 23 Oct 2008 17:19:57 +0000 Subject: [PATCH] fix re-joining a groupchat when control is already opened. Fixes #4425 --- src/gajim.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/gajim.py b/src/gajim.py index fda7881c8..a604a6b98 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -2600,12 +2600,11 @@ class Interface: _('You cannot join a group chat while you are invisible')) return - minimized_control_exists = False - if room_jid in gajim.interface.minimized_controls[account]: - minimized_control_exists = True + minimized_control = gajim.interface.minimized_controls[account].get( + room_jid, None) - if not minimized_control_exists and \ - not self.msg_win_mgr.has_window(room_jid, account): + if minimized_control is None and not self.msg_win_mgr.has_window(room_jid, + account): # Join new groupchat if minimize: contact = gajim.contacts.create_contact(jid=room_jid, name=nick) @@ -2614,12 +2613,14 @@ class Interface: self.roster.add_groupchat(room_jid, account) else: self.new_room(room_jid, nick, account, is_continued=is_continued) - elif not minimized_control_exists: + elif minimized_control is None: # We are already in that groupchat gc_control = self.msg_win_mgr.get_gc_control(room_jid, account) + gc_control.nick = nick gc_control.parent_win.set_active_tab(gc_control) else: # We are already in this groupchat and it is minimized + minimized_control.nick = nick self.roster.add_groupchat(room_jid, account) # Connect