SingleMEssageWindow now shows resource of sender

This commit is contained in:
Yann Leboulanger 2005-11-23 18:19:22 +00:00
parent c9ad61044d
commit 004c2b546e
2 changed files with 7 additions and 4 deletions

View File

@ -933,7 +933,7 @@ class SingleMessageWindow:
'''SingleMessageWindow can send or show a received
singled message depending on action argument'''
def __init__(self, account, to = '', action = '', from_whom = '',
subject = '', message = ''):
subject = '', message = '', resource = ''):
self.account = account
self.action = action
@ -974,7 +974,10 @@ class SingleMessageWindow:
self.subject_entry.grab_focus()
elif self.action == 'receive':
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.subject_entry.set_property('editable', False)
self.message_textview.set_editable(False)

View File

@ -1701,7 +1701,7 @@ _('If "%s" accepts this request you will know his or her status.') %jid)
jid)
dialogs.SingleMessageWindow(account, contact.jid,
action = 'receive', from_whom = jid, subject = subject,
message = msg)
message = msg, resource = resource)
return
# 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':
dialogs.SingleMessageWindow(account, jid,
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)
return True
elif typ == 'file-request':