def download_progress(self, recvbytes, totalbytes):
#print "[update_progress] recvbytes=%d, totalbytes=%d" % (recvbytes, totalbytes)
if ( recvbytes - self.last_recvbytes ) > 10000: # anti-flicker
self.progress = int(100*(float(recvbytes)/float(totalbytes)))
self.name = _("Downloading") + ' ' + "%d of %d kBytes" % (recvbytes/1024, totalbytes/1024)
self.last_recvbytes = recvbytes
def download_progress(self, recvbytes, totalbytes):
#print "[update_progress] recvbytes=%d, totalbytes=%d" % (recvbytes, totalbytes)
if ( recvbytes - self.last_recvbytes ) > 10000: # anti-flicker
self.progress = int(100*(float(recvbytes)/float(totalbytes)))
self.name = _("Downloading") + ' ' + "%d of %d kBytes" % (recvbytes/1024, totalbytes/1024)
self.last_recvbytes = recvbytes