diff --git a/src/gui_interface.py b/src/gui_interface.py index 5877a706fcd7453048b85c906d4417a219cdf8d0..3329ba359a4d5ea46f9cb963e03209a861f0464e 100644 --- a/src/gui_interface.py +++ b/src/gui_interface.py @@ -261,11 +261,16 @@ class Interface: ctrl = self.msg_win_mgr.get_gc_control(room_jid, account) win.remove_tab(ctrl, 3) - dlg = dialogs.InputDialog(_('Password Required'), + gc_control = self.msg_win_mgr.get_gc_control(room_jid, account) + if gc_control: + if gc_control.error_dialog: + gc_control.error_dialog.destroy() + + gc_control.error_dialog = dialogs.InputDialog(_('Password Required'), _('A Password is required to join the room %s. Please type it.') % \ room_jid, is_modal=False, ok_handler=on_ok, cancel_handler=on_cancel) - dlg.input_entry.set_visibility(False) + gc_control.error_dialog.input_entry.set_visibility(False) def handle_event_gc_presence(self, obj): gc_control = obj.gc_control