Show Count progress bar before copy/move of 1st file,Z not after.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2010-02-14 20:09:36 +03:00 committed by Slava Zanko
parent 47abf9282f
commit 334560adac

View File

@ -359,14 +359,11 @@ progress_update_one (FileOpContext *ctx,
}
/* Apply some heuristic here to not call the update stuff very often */
ret =
file_progress_show_count (ctx, *progress_count,
ctx->progress_count);
if (ret != FILE_CONT)
return ret;
ret =
file_progress_show_bytes (ctx, *progress_bytes,
ctx->progress_bytes);
ret = file_progress_show_count (ctx, *progress_count,
ctx->progress_count);
if (ret == FILE_CONT)
ret = file_progress_show_bytes (ctx, *progress_bytes,
ctx->progress_bytes);
return ret;
}
@ -705,12 +702,19 @@ copy_file_file (FileOpContext *ctx, const char *src_path, const char *dst_path,
}
file_progress_set_stalled_label (ctx, stalled_msg);
return_status = file_progress_show_bytes (ctx, *progress_bytes +
n_read_total + ctx->do_reget, ctx->progress_bytes);
if (return_status == FILE_CONT) {
return_status =
file_progress_show_count (ctx, *progress_count,
ctx->progress_count);
if (return_status == FILE_CONT)
return_status =
file_progress_show_bytes (ctx, *progress_bytes +
n_read_total + ctx->do_reget,
ctx->progress_bytes);
if (return_status == FILE_CONT)
return_status =
file_progress_show (ctx, n_read_total + ctx->do_reget, file_size);
}
mc_refresh ();
if (return_status != FILE_CONT)
goto ret;