changeset 59e1207ca9eb in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=59e1207ca9eb description: send decline to the same jid (bare or full) from which we received he invite
diffstat:
src/dialogs.py | 14 ++++++++------ src/gui_interface.py | 11 ++++++----- 2 files changed, 14 insertions(+), 11 deletions(-)
diffs (71 lines):
diff -r a3784e043e77 -r 59e1207ca9eb src/dialogs.py --- a/src/dialogs.py Fri Aug 24 09:27:31 2012 +0200 +++ b/src/dialogs.py Fri Aug 24 09:37:40 2012 +0200 @@ -4463,14 +4463,16 @@ PrivacyListWindow(self.account, name, 'EDIT')
class InvitationReceivedDialog: - def __init__(self, account, room_jid, contact_jid, password=None, - comment=None, is_continued=False): + def __init__(self, account, room_jid, contact_fjid, password=None, + comment=None, is_continued=False):
self.room_jid = room_jid self.account = account self.password = password self.is_continued = is_continued - self.contact_jid = contact_jid + self.contact_fjid = contact_fjid + + jid = gajim.get_jid_without_resource(contact_fjid)
pritext = _('''You are invited to a groupchat''') #Don't translate $Contact @@ -4478,8 +4480,8 @@ sectext = _('$Contact has invited you to join a discussion') else: sectext = _('$Contact has invited you to group chat %(room_jid)s')\ - % {'room_jid': room_jid} - contact = gajim.contacts.get_first_contact_from_jid(account, contact_jid) + % {'room_jid': room_jid} + contact = gajim.contacts.get_first_contact_from_jid(account, jid) contact_text = contact and contact.name or contact_jid sectext = sectext.replace('$Contact', contact_text)
@@ -4501,7 +4503,7 @@
def on_no(text): gajim.connections[account].decline_invitation(self.room_jid, - self.contact_jid, text) + self.contact_fjid, text)
YesNoDialog(pritext, sectext, text_label=_('Reason:'), on_response_yes=on_yes, on_response_no=on_no) diff -r a3784e043e77 -r 59e1207ca9eb src/gui_interface.py --- a/src/gui_interface.py Fri Aug 24 09:27:31 2012 +0200 +++ b/src/gui_interface.py Fri Aug 24 09:37:40 2012 +0200 @@ -628,18 +628,19 @@ jid = gajim.get_jid_without_resource(obj.jid_from) account = obj.conn.name if helpers.allow_popup_window(account) or not self.systray_enabled: - dialogs.InvitationReceivedDialog(account, obj.room_jid, jid, - obj.password, obj.reason, is_continued=obj.is_continued) + dialogs.InvitationReceivedDialog(account, obj.room_jid, + obj.jid_from, obj.password, obj.reason, + is_continued=obj.is_continued) return
- self.add_event(account, jid, 'gc-invitation', (obj.room_jid, + self.add_event(account, obj.jid_from, 'gc-invitation', (obj.room_jid, obj.reason, obj.password, obj.is_continued))
if helpers.allow_showing_notification(account): path = gtkgui_helpers.get_icon_path('gajim-gc_invitation', 48) event_type = _('Groupchat Invitation') - notify.popup(event_type, jid, account, 'gc-invitation', path, - event_type, obj.room_jid) + notify.popup(event_type, obj.jid_from, account, 'gc-invitation', + path, event_type, obj.room_jid)
def forget_gpg_passphrase(self, keyid): if keyid in self.gpg_passphrase: