changeset 17e362df3348 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=17e362df3348 description: dont compare hashes on SI transfer
diffstat:
src/filetransfers_window.py | 4 +++- src/gui_interface.py | 13 +++++++------ 2 files changed, 10 insertions(+), 7 deletions(-)
diffs (44 lines):
diff -r 06bd222f8cc3 -r 17e362df3348 src/filetransfers_window.py --- a/src/filetransfers_window.py Sat Apr 07 00:56:44 2012 -0400 +++ b/src/filetransfers_window.py Sat Apr 07 23:12:15 2012 -0400 @@ -639,7 +639,9 @@ status = 'stop' self.model.set(iter_, 0, self.get_icon(status)) if transfered_size == full_size: - if file_props['type'] == 'r': + # If we are receiver and this is a jingle session + if file_props['type'] == 'r' and 'session-sid' in file_props: + # Show that we are computing the hash self.set_status(typ, sid, 'computing') else: self.set_status(typ, sid, 'ok') diff -r 06bd222f8cc3 -r 17e362df3348 src/gui_interface.py --- a/src/gui_interface.py Sat Apr 07 00:56:44 2012 -0400 +++ b/src/gui_interface.py Sat Apr 07 23:12:15 2012 -0400 @@ -34,7 +34,6 @@ ## You should have received a copy of the GNU General Public License ## along with Gajim. If not, see http://www.gnu.org/licenses/. ## - import os import sys import re @@ -954,11 +953,13 @@ return
if file_props['type'] == 'r': # we receive a file - jid = unicode(file_props['sender']) - # Compare hashes in a new thread - self.hashThread = Thread(target=self.__compare_hashes, - args=(account, file_props)) - self.hashThread.start() + # If we have a jingle session id, it is a jingle transfer + # we compare hashes + if 'session-sid' in file_props: + # Compare hashes in a new thread + self.hashThread = Thread(target=self.__compare_hashes, + args=(account, file_props)) + self.hashThread.start() gajim.socks5queue.remove_receiver(file_props['sid'], True, True) else: # we send a file jid = unicode(file_props['receiver'])