'Send message to the main dialog to set the progress bar.
:param done: Block count of packaged retrieved.
:type done: int
:param block: Block size of the data pack retrieved.
:type block: int
:param total: Total size of the hosts data file.
:type total: int'

def set_progress(self, done, block, total):

    done = (done * block)
    if (total <= 0):
        total = self.filesize
    prog = ((100 * done) / total)
    done = CommonUtil.convert_size(done)
    total = CommonUtil.convert_size(total)
    text = (unicode(_translate('Util', 'Downloading:    %s    /    %s', None)) % (done, total))
    self.prog_trigger.emit(prog, text)
