sending fix

This commit is contained in:
ingvar1995 2016-03-21 23:51:29 +03:00
parent bfbc82a9a3
commit 1897fa762a
3 changed files with 2 additions and 7 deletions

View File

@ -169,7 +169,7 @@ def file_recv_chunk(tox, friend_number, file_number, position, chunk, length, us
def file_chunk_request(tox, friend_number, file_number, position, size, user_data):
invoke_in_main_thread(Profile.get_instance().outgoing_chunk,
Profile.get_instance().outgoing_chunk(
friend_number,
file_number,
position,

View File

@ -79,10 +79,7 @@ class SendTransfer(FileTransfer):
if size:
self._file.seek(position)
data = self._file.read(size)
try:
self._tox.file_send_chunk(self._friend_number, self._file_number, position, data)
except:
print self._friend_number, self._file_number, position, data
self._done += size
self._state_changed.signal.emit(self.state, self._done / self._size)
else:

View File

@ -241,8 +241,6 @@ class FileTransferItem(QtGui.QListWidget):
@QtCore.Slot(int, float)
def update(self, state, progress):
self.pb.setValue(int(progress * 100))
#self.pb.repaint()
print state, progress
if state == TOX_FILE_TRANSFER_STATE['CANCELED']:
self.setStyleSheet('QListWidget { background-color: red; }')
self.cancel.setVisible(False)