Use InvitationReceivedDialog asynchronously. see #4147
This commit is contained in:
parent
0c662cf2fd
commit
a5584151c2
|
@ -2927,8 +2927,8 @@ class PrivacyListsWindow:
|
||||||
PrivacyListWindow(self.account, name, 'EDIT')
|
PrivacyListWindow(self.account, name, 'EDIT')
|
||||||
|
|
||||||
class InvitationReceivedDialog:
|
class InvitationReceivedDialog:
|
||||||
def __init__(self, account, room_jid, contact_jid, password = None,
|
def __init__(self, account, room_jid, contact_jid, password=None,
|
||||||
comment = None, is_continued = False):
|
comment=None, is_continued=False):
|
||||||
|
|
||||||
self.room_jid = room_jid
|
self.room_jid = room_jid
|
||||||
self.account = account
|
self.account = account
|
||||||
|
@ -2951,9 +2951,8 @@ class InvitationReceivedDialog:
|
||||||
comment = _('Comment: %s') % comment
|
comment = _('Comment: %s') % comment
|
||||||
sectext += '\n\n%s' % comment
|
sectext += '\n\n%s' % comment
|
||||||
sectext += '\n\n' + _('Do you want to accept the invitation?')
|
sectext += '\n\n' + _('Do you want to accept the invitation?')
|
||||||
|
|
||||||
dialog = YesNoDialog(pritext, sectext)
|
def on_yes(checked):
|
||||||
if dialog.get_response() == gtk.RESPONSE_YES:
|
|
||||||
try:
|
try:
|
||||||
if self.is_continued:
|
if self.is_continued:
|
||||||
gajim.interface.join_gc_room(self.account, self.room_jid,
|
gajim.interface.join_gc_room(self.account, self.room_jid,
|
||||||
|
@ -2963,6 +2962,8 @@ class InvitationReceivedDialog:
|
||||||
except GajimGeneralException:
|
except GajimGeneralException:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
dialog = YesNoDialog(pritext, sectext, on_response_yes=on_yes)
|
||||||
|
|
||||||
class ProgressDialog:
|
class ProgressDialog:
|
||||||
def __init__(self, title_text, during_text, messages_queue):
|
def __init__(self, title_text, during_text, messages_queue):
|
||||||
'''during text is what to show during the procedure,
|
'''during text is what to show during the procedure,
|
||||||
|
|
Loading…
Reference in New Issue