mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 21:06:52 +03:00
Grammar.
(cherry picked from commit 7f1a2e76af
)
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
75cd51b060
commit
0a952de787
@ -744,7 +744,7 @@ copy_file_file_display_progress (FileOpTotalContext * tctx, FileOpContext * ctx,
|
||||
{
|
||||
uintmax_t remain_bytes;
|
||||
|
||||
remain_bytes = ctx->progress_bytes - tctx->copyed_bytes;
|
||||
remain_bytes = ctx->progress_bytes - tctx->copied_bytes;
|
||||
#if 1
|
||||
{
|
||||
int total_secs = tv_current.tv_sec - tctx->transfer_start.tv_sec;
|
||||
@ -752,7 +752,7 @@ copy_file_file_display_progress (FileOpTotalContext * tctx, FileOpContext * ctx,
|
||||
if (total_secs < 1)
|
||||
total_secs = 1;
|
||||
|
||||
tctx->bps = tctx->copyed_bytes / total_secs;
|
||||
tctx->bps = tctx->copied_bytes / total_secs;
|
||||
tctx->eta_secs = (tctx->bps != 0) ? remain_bytes / tctx->bps : 0;
|
||||
}
|
||||
#else
|
||||
@ -1657,7 +1657,7 @@ copy_file_file (FileOpTotalContext * tctx, FileOpContext * ctx,
|
||||
}
|
||||
}
|
||||
|
||||
tctx->copyed_bytes = tctx->progress_bytes + n_read_total + ctx->do_reget;
|
||||
tctx->copied_bytes = tctx->progress_bytes + n_read_total + ctx->do_reget;
|
||||
|
||||
secs = (tv_current.tv_sec - tv_last_update.tv_sec);
|
||||
update_secs = (tv_current.tv_sec - tv_last_input.tv_sec);
|
||||
@ -1685,7 +1685,7 @@ copy_file_file (FileOpTotalContext * tctx, FileOpContext * ctx,
|
||||
if (verbose && ctx->dialog_type == FILEGUI_DIALOG_MULTI_ITEM)
|
||||
{
|
||||
file_progress_show_count (ctx, tctx->progress_count, ctx->progress_count);
|
||||
file_progress_show_total (tctx, ctx, tctx->copyed_bytes, force_update);
|
||||
file_progress_show_total (tctx, ctx, tctx->copied_bytes, force_update);
|
||||
}
|
||||
|
||||
file_progress_show (ctx, n_read_total + ctx->do_reget, file_size, stalled_msg,
|
||||
|
@ -723,7 +723,7 @@ file_progress_show_count (FileOpContext * ctx, size_t done, size_t total)
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
file_progress_show_total (FileOpTotalContext * tctx, FileOpContext * ctx, uintmax_t copyed_bytes,
|
||||
file_progress_show_total (FileOpTotalContext * tctx, FileOpContext * ctx, uintmax_t copied_bytes,
|
||||
gboolean show_summary)
|
||||
{
|
||||
char buffer[BUF_TINY];
|
||||
@ -745,7 +745,7 @@ file_progress_show_total (FileOpTotalContext * tctx, FileOpContext * ctx, uintma
|
||||
else
|
||||
{
|
||||
gauge_set_value (ui->progress_total_gauge, 1024,
|
||||
(int) (1024 * copyed_bytes / ctx->progress_bytes));
|
||||
(int) (1024 * copied_bytes / ctx->progress_bytes));
|
||||
gauge_show (ui->progress_total_gauge, 1);
|
||||
}
|
||||
}
|
||||
@ -780,7 +780,7 @@ file_progress_show_total (FileOpTotalContext * tctx, FileOpContext * ctx, uintma
|
||||
|
||||
label_set_text (ui->time_label, buffer);
|
||||
|
||||
size_trunc_len (buffer2, 5, tctx->copyed_bytes, 0, panels_options.kilobyte_si);
|
||||
size_trunc_len (buffer2, 5, tctx->copied_bytes, 0, panels_options.kilobyte_si);
|
||||
if (!file_op_compute_totals)
|
||||
g_snprintf (buffer, BUF_TINY, _(" Total: %s "), buffer2);
|
||||
else
|
||||
|
@ -35,7 +35,7 @@ void file_progress_show (FileOpContext * ctx, off_t done, off_t total,
|
||||
const char *stalled_msg, gboolean force_update);
|
||||
void file_progress_show_count (FileOpContext * ctx, size_t done, size_t total);
|
||||
void file_progress_show_total (FileOpTotalContext * tctx, FileOpContext * ctx,
|
||||
uintmax_t copyed_bytes, gboolean show_summary);
|
||||
uintmax_t copied_bytes, gboolean show_summary);
|
||||
void file_progress_show_source (FileOpContext * ctx, const char *path);
|
||||
void file_progress_show_target (FileOpContext * ctx, const char *path);
|
||||
void file_progress_show_deleting (FileOpContext * ctx, const char *path);
|
||||
|
@ -167,7 +167,7 @@ typedef struct
|
||||
{
|
||||
size_t progress_count;
|
||||
uintmax_t progress_bytes;
|
||||
uintmax_t copyed_bytes;
|
||||
uintmax_t copied_bytes;
|
||||
size_t bps;
|
||||
size_t bps_count;
|
||||
struct timeval transfer_start;
|
||||
|
Loading…
Reference in New Issue
Block a user