mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
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:
parent
63db380705
commit
0a6604a626
@ -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 */
|
/* 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;
|
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;
|
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);
|
file_progress_show_target (ctx, dst_vpath);
|
||||||
|
|
||||||
/* FIXME: do we really need to check buttons in case of single file? */
|
/* 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;
|
return_status = FILE_ABORT;
|
||||||
goto ret;
|
goto ret;
|
||||||
@ -1353,7 +1353,7 @@ move_file_file (const WPanel *panel, file_op_total_context_t *tctx, file_op_cont
|
|||||||
if (verbose)
|
if (verbose)
|
||||||
file_progress_show (ctx, 0, 0, "", FALSE);
|
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)
|
if (return_status != FILE_CONT)
|
||||||
goto ret;
|
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))
|
if (file_progress_show_deleting (ctx, vpath, &tctx->progress_count))
|
||||||
{
|
{
|
||||||
file_progress_show_count (ctx, tctx->progress_count, ctx->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;
|
return FILE_ABORT;
|
||||||
|
|
||||||
mc_refresh ();
|
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)
|
if (tctx->progress_count == 0)
|
||||||
return FILE_CONT;
|
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_deleting (ctx, vpath, NULL);
|
||||||
file_progress_show_count (ctx, tctx->progress_count, ctx->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;
|
return FILE_ABORT;
|
||||||
|
|
||||||
mc_refresh ();
|
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_deleting (ctx, vpath, NULL);
|
||||||
file_progress_show_count (ctx, count, ctx->progress_count);
|
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;
|
return FILE_ABORT;
|
||||||
|
|
||||||
mc_refresh ();
|
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);
|
file_progress_show_target (ctx, dst_vpath);
|
||||||
|
|
||||||
/* FIXME: do we really need to check buttons in case of single directory? */
|
/* 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;
|
return_status = FILE_ABORT;
|
||||||
goto ret_fast;
|
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)
|
if (verbose)
|
||||||
file_progress_show (ctx, 0, 0, "", FALSE);
|
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)
|
if (return_status != FILE_CONT)
|
||||||
goto ret;
|
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)
|
if (!mc_global.we_are_background)
|
||||||
#endif
|
#endif
|
||||||
/* create UI to show confirmation dialog */
|
/* 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)
|
if (is_file)
|
||||||
value = move_file_file (panel, tctx, ctx, src, dest);
|
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_source (ctx, src_vpath);
|
||||||
file_progress_show_target (ctx, dst_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;
|
return_status = FILE_ABORT;
|
||||||
goto ret_fast;
|
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);
|
file_progress_show (ctx, 1, 1, "", TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return_status = check_progress_buttons (ctx);
|
return_status = file_progress_check_buttons (ctx);
|
||||||
mc_refresh ();
|
mc_refresh ();
|
||||||
|
|
||||||
if (return_status == FILE_CONT)
|
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 ();
|
mc_refresh ();
|
||||||
}
|
}
|
||||||
|
|
||||||
return_status = check_progress_buttons (ctx);
|
return_status = file_progress_check_buttons (ctx);
|
||||||
if (return_status != FILE_CONT)
|
if (return_status != FILE_CONT)
|
||||||
{
|
{
|
||||||
int query_res;
|
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_deleting (ctx, vpath, NULL);
|
||||||
file_progress_show_count (ctx, tctx->progress_count, ctx->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;
|
return FILE_ABORT;
|
||||||
|
|
||||||
mc_refresh ();
|
mc_refresh ();
|
||||||
@ -3663,7 +3663,7 @@ panel_operate (void *source_panel, FileOperation operation, gboolean force_singl
|
|||||||
file_progress_show (ctx, 0, 0, "", FALSE);
|
file_progress_show (ctx, 0, 0, "", FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_progress_buttons (ctx) == FILE_ABORT)
|
if (file_progress_check_buttons (ctx) == FILE_ABORT)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
mc_refresh ();
|
mc_refresh ();
|
||||||
|
@ -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 */
|
/* Do not close the dialog because the query dialog will be shown */
|
||||||
if (parm == CK_Cancel)
|
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_HANDLED;
|
||||||
}
|
}
|
||||||
return MSG_NOT_HANDLED;
|
return MSG_NOT_HANDLED;
|
||||||
@ -767,7 +767,7 @@ progress_button_callback (WButton *button, int action)
|
|||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
FileProgressStatus
|
FileProgressStatus
|
||||||
check_progress_buttons (file_op_context_t *ctx)
|
file_progress_check_buttons (file_op_context_t *ctx)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
Gpm_Event event;
|
Gpm_Event event;
|
||||||
@ -819,8 +819,8 @@ check_progress_buttons (file_op_context_t *ctx)
|
|||||||
/* {{{ File progress display routines */
|
/* {{{ File progress display routines */
|
||||||
|
|
||||||
void
|
void
|
||||||
file_op_context_create_ui (file_op_context_t *ctx, gboolean with_eta,
|
file_progress_ui_create (file_op_context_t *ctx, gboolean with_eta,
|
||||||
filegui_dialog_type_t dialog_type)
|
filegui_dialog_type_t dialog_type)
|
||||||
{
|
{
|
||||||
file_op_context_ui_t *ui;
|
file_op_context_ui_t *ui;
|
||||||
Widget *w;
|
Widget *w;
|
||||||
@ -969,7 +969,7 @@ file_op_context_create_ui (file_op_context_t *ctx, gboolean with_eta,
|
|||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void
|
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)
|
if (ctx != NULL && ctx->ui != NULL)
|
||||||
{
|
{
|
||||||
|
@ -18,14 +18,14 @@
|
|||||||
|
|
||||||
/*** declarations of public functions ************************************************************/
|
/*** declarations of public functions ************************************************************/
|
||||||
|
|
||||||
void file_op_context_create_ui (file_op_context_t * ctx, gboolean with_eta,
|
void file_progress_ui_create (file_op_context_t * ctx, gboolean with_eta,
|
||||||
filegui_dialog_type_t dialog_type);
|
filegui_dialog_type_t dialog_type);
|
||||||
void file_op_context_destroy_ui (file_op_context_t * ctx);
|
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,
|
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);
|
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,
|
void file_progress_show (file_op_context_t * ctx, off_t done, off_t total,
|
||||||
const char *stalled_msg, gboolean force_update);
|
const char *stalled_msg, gboolean force_update);
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
* \return The newly-created context, filled with the default file mask values.
|
* \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
|
* 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 *
|
file_op_context_t *
|
||||||
@ -99,7 +99,7 @@ file_op_context_destroy (file_op_context_t *ctx)
|
|||||||
{
|
{
|
||||||
if (ctx != NULL)
|
if (ctx != NULL)
|
||||||
{
|
{
|
||||||
file_op_context_destroy_ui (ctx);
|
file_progress_ui_destroy (ctx);
|
||||||
mc_search_free (ctx->search_handle);
|
mc_search_free (ctx->search_handle);
|
||||||
g_free (ctx);
|
g_free (ctx);
|
||||||
}
|
}
|
||||||
|
@ -727,7 +727,7 @@ tree_copy (WTree *tree, const char *default_dest)
|
|||||||
|
|
||||||
ctx = file_op_context_new (OP_COPY);
|
ctx = file_op_context_new (OP_COPY);
|
||||||
tctx = file_op_total_context_new ();
|
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;
|
tctx->ask_overwrite = FALSE;
|
||||||
copy_dir_dir (tctx, ctx, vfs_path_as_str (tree->selected_ptr->name), dest, TRUE, FALSE,
|
copy_dir_dir (tctx, ctx, vfs_path_as_str (tree->selected_ptr->name), dest, TRUE, FALSE,
|
||||||
FALSE, NULL);
|
FALSE, NULL);
|
||||||
@ -774,7 +774,7 @@ tree_move (WTree *tree, const char *default_dest)
|
|||||||
|
|
||||||
ctx = file_op_context_new (OP_MOVE);
|
ctx = file_op_context_new (OP_MOVE);
|
||||||
tctx = file_op_total_context_new ();
|
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);
|
move_dir_dir (tctx, ctx, vfs_path_as_str (tree->selected_ptr->name), dest);
|
||||||
file_op_total_context_destroy (tctx);
|
file_op_total_context_destroy (tctx);
|
||||||
file_op_context_destroy (ctx);
|
file_op_context_destroy (ctx);
|
||||||
@ -832,7 +832,7 @@ tree_rmdir (void *data)
|
|||||||
ctx = file_op_context_new (OP_DELETE);
|
ctx = file_op_context_new (OP_DELETE);
|
||||||
tctx = file_op_total_context_new ();
|
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)
|
if (erase_dir (tctx, ctx, tree->selected_ptr->name) == FILE_CONT)
|
||||||
tree_forget (tree);
|
tree_forget (tree);
|
||||||
file_op_total_context_destroy (tctx);
|
file_op_total_context_destroy (tctx);
|
||||||
|
@ -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);
|
ctx = file_op_context_new (OP_COPY);
|
||||||
tctx = file_op_total_context_new ();
|
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),
|
copy_file_file (tctx, ctx, vfs_path_as_str (default_file_vpath),
|
||||||
vfs_path_as_str (file_vpath));
|
vfs_path_as_str (file_vpath));
|
||||||
file_op_total_context_destroy (tctx);
|
file_op_total_context_destroy (tctx);
|
||||||
|
Loading…
Reference in New Issue
Block a user