prevent having more than one password required dialog per room. Fixes #6790

This commit is contained in:
Yann Leboulanger 2011-05-18 22:48:28 +02:00
parent 14d15923bf
commit 46b1b5db0a
1 changed files with 7 additions and 2 deletions

View File

@ -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