Rename functions.

file_op_context_create_ui -> file_progress_ui_create
file_op_context_destroy_ui -> file_progress_ui_destroy
check_progress_buttons -> file_progress_check_buttons

No functional changes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2024-08-11 15:12:26 +03:00
parent 63db380705
commit 0a6604a626
6 changed files with 32 additions and 32 deletions

View File

@ -804,9 +804,9 @@ panel_operate_init_totals (const WPanel *panel, const vfs_path_t *source,
}
/* destroy already created UI for single file rename operation */
file_op_context_destroy_ui (ctx);
file_progress_ui_destroy (ctx);
file_op_context_create_ui (ctx, TRUE, dialog_type);
file_progress_ui_create (ctx, TRUE, dialog_type);
return status;
}
@ -838,7 +838,7 @@ progress_update_one (file_op_total_context_t *tctx, file_op_context_t *ctx, off_
tv_start = tv_current;
}
return check_progress_buttons (ctx);
return file_progress_check_buttons (ctx);
}
/* --------------------------------------------------------------------------------------------- */
@ -1227,7 +1227,7 @@ move_file_file (const WPanel *panel, file_op_total_context_t *tctx, file_op_cont
file_progress_show_target (ctx, dst_vpath);
/* FIXME: do we really need to check buttons in case of single file? */
if (check_progress_buttons (ctx) == FILE_ABORT)
if (file_progress_check_buttons (ctx) == FILE_ABORT)
{
return_status = FILE_ABORT;
goto ret;
@ -1353,7 +1353,7 @@ move_file_file (const WPanel *panel, file_op_total_context_t *tctx, file_op_cont
if (verbose)
file_progress_show (ctx, 0, 0, "", FALSE);
return_status = check_progress_buttons (ctx);
return_status = file_progress_check_buttons (ctx);
if (return_status != FILE_CONT)
goto ret;
}
@ -1390,7 +1390,7 @@ erase_file (file_op_total_context_t *tctx, file_op_context_t *ctx, const vfs_pat
if (file_progress_show_deleting (ctx, vpath, &tctx->progress_count))
{
file_progress_show_count (ctx, tctx->progress_count, ctx->progress_count);
if (check_progress_buttons (ctx) == FILE_ABORT)
if (file_progress_check_buttons (ctx) == FILE_ABORT)
return FILE_ABORT;
mc_refresh ();
@ -1408,7 +1408,7 @@ erase_file (file_op_total_context_t *tctx, file_op_context_t *ctx, const vfs_pat
if (tctx->progress_count == 0)
return FILE_CONT;
return check_progress_buttons (ctx);
return file_progress_check_buttons (ctx);
}
/* --------------------------------------------------------------------------------------------- */
@ -1480,7 +1480,7 @@ recursive_erase (file_op_total_context_t *tctx, file_op_context_t *ctx, const vf
file_progress_show_deleting (ctx, vpath, NULL);
file_progress_show_count (ctx, tctx->progress_count, ctx->progress_count);
if (check_progress_buttons (ctx) == FILE_ABORT)
if (file_progress_check_buttons (ctx) == FILE_ABORT)
return FILE_ABORT;
mc_refresh ();
@ -1531,7 +1531,7 @@ erase_dir_iff_empty (file_op_context_t *ctx, const vfs_path_t *vpath, size_t cou
{
file_progress_show_deleting (ctx, vpath, NULL);
file_progress_show_count (ctx, count, ctx->progress_count);
if (check_progress_buttons (ctx) == FILE_ABORT)
if (file_progress_check_buttons (ctx) == FILE_ABORT)
return FILE_ABORT;
mc_refresh ();
@ -1607,7 +1607,7 @@ do_move_dir_dir (const WPanel *panel, file_op_total_context_t *tctx, file_op_con
file_progress_show_target (ctx, dst_vpath);
/* FIXME: do we really need to check buttons in case of single directory? */
if (panel != NULL && check_progress_buttons (ctx) == FILE_ABORT)
if (panel != NULL && file_progress_check_buttons (ctx) == FILE_ABORT)
{
return_status = FILE_ABORT;
goto ret_fast;
@ -1724,7 +1724,7 @@ do_move_dir_dir (const WPanel *panel, file_op_total_context_t *tctx, file_op_con
if (verbose)
file_progress_show (ctx, 0, 0, "", FALSE);
return_status = check_progress_buttons (ctx);
return_status = file_progress_check_buttons (ctx);
if (return_status != FILE_CONT)
goto ret;
}
@ -2092,7 +2092,7 @@ operate_single_file (const WPanel *panel, file_op_total_context_t *tctx, file_op
if (!mc_global.we_are_background)
#endif
/* create UI to show confirmation dialog */
file_op_context_create_ui (ctx, TRUE, FILEGUI_DIALOG_ONE_ITEM);
file_progress_ui_create (ctx, TRUE, FILEGUI_DIALOG_ONE_ITEM);
if (is_file)
value = move_file_file (panel, tctx, ctx, src, dest);
@ -2297,7 +2297,7 @@ copy_file_file (file_op_total_context_t *tctx, file_op_context_t *ctx,
file_progress_show_source (ctx, src_vpath);
file_progress_show_target (ctx, dst_vpath);
if (check_progress_buttons (ctx) == FILE_ABORT)
if (file_progress_check_buttons (ctx) == FILE_ABORT)
{
return_status = FILE_ABORT;
goto ret_fast;
@ -2672,7 +2672,7 @@ copy_file_file (file_op_total_context_t *tctx, file_op_context_t *ctx,
file_progress_show (ctx, 1, 1, "", TRUE);
}
return_status = check_progress_buttons (ctx);
return_status = file_progress_check_buttons (ctx);
mc_refresh ();
if (return_status == FILE_CONT)
@ -2791,7 +2791,7 @@ copy_file_file (file_op_total_context_t *tctx, file_op_context_t *ctx,
mc_refresh ();
}
return_status = check_progress_buttons (ctx);
return_status = file_progress_check_buttons (ctx);
if (return_status != FILE_CONT)
{
int query_res;
@ -3305,7 +3305,7 @@ erase_dir (file_op_total_context_t *tctx, file_op_context_t *ctx, const vfs_path
{
file_progress_show_deleting (ctx, vpath, NULL);
file_progress_show_count (ctx, tctx->progress_count, ctx->progress_count);
if (check_progress_buttons (ctx) == FILE_ABORT)
if (file_progress_check_buttons (ctx) == FILE_ABORT)
return FILE_ABORT;
mc_refresh ();
@ -3663,7 +3663,7 @@ panel_operate (void *source_panel, FileOperation operation, gboolean force_singl
file_progress_show (ctx, 0, 0, "", FALSE);
}
if (check_progress_buttons (ctx) == FILE_ABORT)
if (file_progress_check_buttons (ctx) == FILE_ABORT)
break;
mc_refresh ();

View File

@ -391,7 +391,7 @@ file_ui_op_dlg_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm,
/* Do not close the dialog because the query dialog will be shown */
if (parm == CK_Cancel)
{
DIALOG (w)->ret_value = FILE_ABORT; /* for check_progress_buttons() */
DIALOG (w)->ret_value = FILE_ABORT; /* for file_progress_check_buttons() */
return MSG_HANDLED;
}
return MSG_NOT_HANDLED;
@ -767,7 +767,7 @@ progress_button_callback (WButton *button, int action)
/* --------------------------------------------------------------------------------------------- */
FileProgressStatus
check_progress_buttons (file_op_context_t *ctx)
file_progress_check_buttons (file_op_context_t *ctx)
{
int c;
Gpm_Event event;
@ -819,8 +819,8 @@ check_progress_buttons (file_op_context_t *ctx)
/* {{{ File progress display routines */
void
file_op_context_create_ui (file_op_context_t *ctx, gboolean with_eta,
filegui_dialog_type_t dialog_type)
file_progress_ui_create (file_op_context_t *ctx, gboolean with_eta,
filegui_dialog_type_t dialog_type)
{
file_op_context_ui_t *ui;
Widget *w;
@ -969,7 +969,7 @@ file_op_context_create_ui (file_op_context_t *ctx, gboolean with_eta,
/* --------------------------------------------------------------------------------------------- */
void
file_op_context_destroy_ui (file_op_context_t *ctx)
file_progress_ui_destroy (file_op_context_t *ctx)
{
if (ctx != NULL && ctx->ui != NULL)
{

View File

@ -18,14 +18,14 @@
/*** declarations of public functions ************************************************************/
void file_op_context_create_ui (file_op_context_t * ctx, gboolean with_eta,
filegui_dialog_type_t dialog_type);
void file_op_context_destroy_ui (file_op_context_t * ctx);
void file_progress_ui_create (file_op_context_t * ctx, gboolean with_eta,
filegui_dialog_type_t dialog_type);
void file_progress_ui_destroy (file_op_context_t * ctx);
char *file_mask_dialog (file_op_context_t * ctx, gboolean only_one, const char *format,
const void *text, const char *def_text, gboolean * do_bg);
FileProgressStatus check_progress_buttons (file_op_context_t * ctx);
FileProgressStatus file_progress_check_buttons (file_op_context_t * ctx);
void file_progress_show (file_op_context_t * ctx, off_t done, off_t total,
const char *stalled_msg, gboolean force_update);

View File

@ -62,7 +62,7 @@
* \return The newly-created context, filled with the default file mask values.
*
* Creates a new file operation context with the default values. If you later want
* to have a user interface for this, call file_op_context_create_ui().
* to have a user interface for this, call file_progress_ui_create().
*/
file_op_context_t *
@ -99,7 +99,7 @@ file_op_context_destroy (file_op_context_t *ctx)
{
if (ctx != NULL)
{
file_op_context_destroy_ui (ctx);
file_progress_ui_destroy (ctx);
mc_search_free (ctx->search_handle);
g_free (ctx);
}

View File

@ -727,7 +727,7 @@ tree_copy (WTree *tree, const char *default_dest)
ctx = file_op_context_new (OP_COPY);
tctx = file_op_total_context_new ();
file_op_context_create_ui (ctx, FALSE, FILEGUI_DIALOG_MULTI_ITEM);
file_progress_ui_create (ctx, FALSE, FILEGUI_DIALOG_MULTI_ITEM);
tctx->ask_overwrite = FALSE;
copy_dir_dir (tctx, ctx, vfs_path_as_str (tree->selected_ptr->name), dest, TRUE, FALSE,
FALSE, NULL);
@ -774,7 +774,7 @@ tree_move (WTree *tree, const char *default_dest)
ctx = file_op_context_new (OP_MOVE);
tctx = file_op_total_context_new ();
file_op_context_create_ui (ctx, FALSE, FILEGUI_DIALOG_ONE_ITEM);
file_progress_ui_create (ctx, FALSE, FILEGUI_DIALOG_ONE_ITEM);
move_dir_dir (tctx, ctx, vfs_path_as_str (tree->selected_ptr->name), dest);
file_op_total_context_destroy (tctx);
file_op_context_destroy (ctx);
@ -832,7 +832,7 @@ tree_rmdir (void *data)
ctx = file_op_context_new (OP_DELETE);
tctx = file_op_total_context_new ();
file_op_context_create_ui (ctx, FALSE, FILEGUI_DIALOG_ONE_ITEM);
file_progress_ui_create (ctx, FALSE, FILEGUI_DIALOG_ONE_ITEM);
if (erase_dir (tctx, ctx, tree->selected_ptr->name) == FILE_CONT)
tree_forget (tree);
file_op_total_context_destroy (tctx);

View File

@ -62,7 +62,7 @@ check_for_default (const vfs_path_t *default_file_vpath, const vfs_path_t *file_
ctx = file_op_context_new (OP_COPY);
tctx = file_op_total_context_new ();
file_op_context_create_ui (ctx, 0, FALSE);
file_progress_ui_create (ctx, 0, FALSE);
copy_file_file (tctx, ctx, vfs_path_as_str (default_file_vpath),
vfs_path_as_str (file_vpath));
file_op_total_context_destroy (tctx);