changeset ead9d19d0ee5 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=ead9d19d0ee5 description: re-request file transfer to the correct resource
diffstat:
src/filetransfers_window.py | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-)
diffs (36 lines):
diff -r 9351f657ac8e -r ead9d19d0ee5 src/filetransfers_window.py --- a/src/filetransfers_window.py Sat Sep 15 10:39:35 2012 -0400 +++ b/src/filetransfers_window.py Sun Sep 16 20:54:07 2012 +0200 @@ -249,13 +249,17 @@
def show_hash_error(self, jid, file_props, account):
- def on_yes(dummy): + def on_yes(dummy, fjid, file_props, account): # Delete old file os.remove(file_props.file_name) + jid, resource = gajim.get_room_and_nick_from_fjid(fjid) + if resource: + contact = gajim.contacts.get_contact(account, jid, resource) + else: + contact = gajim.contacts.get_contact_with_highest_priority( + account, jid) + fjid = contact.get_full_jid() # Request the file to the sender - contact = gajim.contacts.get_contact_with_highest_priority(account, - jid) - fjid = contact.get_full_jid() sid = helpers.get_random_string_16() new_file_props = FilesProp.getNewFileProp(account, sid) new_file_props.file_name = file_props.file_name @@ -278,8 +282,8 @@ dialogs.YesNoDialog(('File transfer error'), _('The file %(file)s has been fully received, but it seems to be ' 'wrongly received.\nDo you want to reload it?') % \ - {'file': file_name}, on_response_yes=on_yes, - type_=gtk.MESSAGE_ERROR) + {'file': file_name}, on_response_yes=(on_yes, jid, file_props, + account), type_=gtk.MESSAGE_ERROR)
def show_file_send_request(self, account, contact): win = gtk.ScrolledWindow()