diff --git a/src/file.c b/src/file.c index 4d7e3fb0a..0c0799db3 100644 --- a/src/file.c +++ b/src/file.c @@ -1713,7 +1713,7 @@ panel_operate_generate_prompt (const WPanel *panel, const int operation, #ifdef ENABLE_NLS static gboolean i18n_flag = FALSE; if (!i18n_flag) { - int i; + size_t i; for (i = sizeof (op_names1) / sizeof (op_names1[0]); i--;) op_names1[i] = Q_(op_names1[i]); @@ -1818,7 +1818,10 @@ int panel_operate (void *source_panel, FileOperation operation, int force_single) { - WPanel *panel = source_panel; + WPanel *panel = (WPanel *) source_panel; + const gboolean single_entry = force_single || (panel->marked <= 1) + || (get_current_type () == view_tree); + char *source = NULL; #ifdef WITH_FULL_PATHS char *source_with_path = NULL; @@ -1828,8 +1831,6 @@ panel_operate (void *source_panel, FileOperation operation, char *dest = NULL; char *temp = NULL; char *save_cwd = NULL, *save_dest = NULL; - int single_entry = (get_current_type () == view_tree) - || (panel->marked <= 1) || force_single; struct stat src_stat, dst_stat; int i; FileProgressStatus value; @@ -1841,6 +1842,15 @@ panel_operate (void *source_panel, FileOperation operation, int dst_result; int do_bg = 0; /* do background operation? */ +#ifdef ENABLE_NLS + static gboolean i18n_flag = FALSE; + if (!i18n_flag) { + for (i = sizeof (op_names1) / sizeof (op_names1[0]); i--;) + op_names[i] = Q_(op_names[i]); + i18n_flag = TRUE; + } +#endif /* ENABLE_NLS */ + free_linklist (&linklist); free_linklist (&dest_dirs); @@ -1937,7 +1947,7 @@ panel_operate (void *source_panel, FileOperation operation, if (safe_delete) query_set_sel (1); - i = query_dialog (Q_(op_names[operation]), fmd_buf, D_ERROR, 2, + i = query_dialog (op_names[operation], fmd_buf, D_ERROR, 2, _("&Yes"), _("&No")); if (i != 0) { diff --git a/src/filegui.c b/src/filegui.c index 6d7fa2e32..ef1ba29fb 100644 --- a/src/filegui.c +++ b/src/filegui.c @@ -877,10 +877,6 @@ file_mask_dialog (FileOpContext *ctx, FileOperation operation, char *def_text_secure; int val; -#ifdef ENABLE_NLS - static gboolean i18n = FALSE; -#endif /* !ENABLE_NLS */ - QuickWidget fmd_widgets[] = { /* 0 */ QUICK_BUTTON (42, 64, 10, FMDY, N_("&Cancel"), B_CANCEL, NULL), @@ -916,13 +912,6 @@ file_mask_dialog (FileOpContext *ctx, FileOperation operation, g_return_val_if_fail (ctx != NULL, NULL); #ifdef ENABLE_NLS - if (!i18n) { - for (i = sizeof (op_names) / sizeof (op_names[0]); i--;) - op_names[i] = Q_(op_names[i]); - - i18n = TRUE; - } - /* buttons */ for (i = 0; i <= 2 - OFFSET; i++) fmd_widgets[i].u.button.text = _(fmd_widgets[i].u.button.text);