SingleMEssageWindow now shows resource of sender
This commit is contained in:
parent
c9ad61044d
commit
004c2b546e
|
@ -933,7 +933,7 @@ class SingleMessageWindow:
|
||||||
'''SingleMessageWindow can send or show a received
|
'''SingleMessageWindow can send or show a received
|
||||||
singled message depending on action argument'''
|
singled message depending on action argument'''
|
||||||
def __init__(self, account, to = '', action = '', from_whom = '',
|
def __init__(self, account, to = '', action = '', from_whom = '',
|
||||||
subject = '', message = ''):
|
subject = '', message = '', resource = ''):
|
||||||
self.account = account
|
self.account = account
|
||||||
self.action = action
|
self.action = action
|
||||||
|
|
||||||
|
@ -974,7 +974,10 @@ class SingleMessageWindow:
|
||||||
self.subject_entry.grab_focus()
|
self.subject_entry.grab_focus()
|
||||||
elif self.action == 'receive':
|
elif self.action == 'receive':
|
||||||
self.from_whom = from_whom
|
self.from_whom = from_whom
|
||||||
self.from_entry.set_text(self.from_whom)
|
fjid = from_whom # Full jid of sender (with resource)
|
||||||
|
if resource:
|
||||||
|
fjid += resource
|
||||||
|
self.from_entry.set_text(fjid)
|
||||||
self.from_entry.set_property('editable', False)
|
self.from_entry.set_property('editable', False)
|
||||||
self.subject_entry.set_property('editable', False)
|
self.subject_entry.set_property('editable', False)
|
||||||
self.message_textview.set_editable(False)
|
self.message_textview.set_editable(False)
|
||||||
|
|
|
@ -1701,7 +1701,7 @@ _('If "%s" accepts this request you will know his or her status.') %jid)
|
||||||
jid)
|
jid)
|
||||||
dialogs.SingleMessageWindow(account, contact.jid,
|
dialogs.SingleMessageWindow(account, contact.jid,
|
||||||
action = 'receive', from_whom = jid, subject = subject,
|
action = 'receive', from_whom = jid, subject = subject,
|
||||||
message = msg)
|
message = msg, resource = resource)
|
||||||
return
|
return
|
||||||
|
|
||||||
# We print if window is opened and it's not a single message
|
# We print if window is opened and it's not a single message
|
||||||
|
@ -1942,7 +1942,7 @@ _('If "%s" accepts this request you will know his or her status.') %jid)
|
||||||
if typ == 'normal':
|
if typ == 'normal':
|
||||||
dialogs.SingleMessageWindow(account, jid,
|
dialogs.SingleMessageWindow(account, jid,
|
||||||
action = 'receive', from_whom = jid, subject = data[1],
|
action = 'receive', from_whom = jid, subject = data[1],
|
||||||
message = data[0])
|
message = data[0], resource = data[5])
|
||||||
gajim.interface.remove_first_event(account, jid, typ)
|
gajim.interface.remove_first_event(account, jid, typ)
|
||||||
return True
|
return True
|
||||||
elif typ == 'file-request':
|
elif typ == 'file-request':
|
||||||
|
|
Loading…
Reference in New Issue