diff --git a/src/file.c b/src/file.c
index de3d600..d53b6c2 100644
a
|
b
|
panel_operate_generate_prompt (const WPanel *panel, const int operation, |
1768 | 1768 | return g_strdup (format_string); |
1769 | 1769 | } |
1770 | 1770 | |
| 1771 | #ifdef WITH_BACKGROUND |
| 1772 | int file_op_context_destroy_bg_wrap (FileOpContext *ctx) { |
| 1773 | file_op_context_destroy(ctx); |
| 1774 | return 0; |
| 1775 | } |
| 1776 | #endif |
| 1777 | |
1771 | 1778 | /** |
1772 | 1779 | * panel_operate: |
1773 | 1780 | * |
… |
… |
panel_operate (void *source_panel, FileOperation operation, |
1911 | 1918 | } |
1912 | 1919 | } |
1913 | 1920 | |
| 1921 | /* Background also need ctx->ui, but not full */ |
| 1922 | if (do_bg) |
| 1923 | file_op_context_create_ui_without_init (ctx, 1); |
| 1924 | else |
| 1925 | file_op_context_create_ui (ctx, 1); |
| 1926 | |
1914 | 1927 | #ifdef WITH_BACKGROUND |
1915 | 1928 | /* Did the user select to do a background operation? */ |
1916 | 1929 | if (do_bg) { |
… |
… |
panel_operate (void *source_panel, FileOperation operation, |
1949 | 1962 | |
1950 | 1963 | /* Now, let's do the job */ |
1951 | 1964 | |
1952 | | if (do_bg) |
1953 | | ctx->ui = NULL; |
1954 | | else |
1955 | | file_op_context_create_ui (ctx, 1); |
1956 | | |
1957 | 1965 | /* This code is only called by the tree and panel code */ |
1958 | 1966 | if (single_entry) { |
1959 | 1967 | /* We now have ETA in all cases */ |
… |
… |
panel_operate (void *source_panel, FileOperation operation, |
2181 | 2189 | #ifdef WITH_BACKGROUND |
2182 | 2190 | /* Let our parent know we are saying bye bye */ |
2183 | 2191 | if (we_are_background) { |
| 2192 | parent_call ((void *) file_op_context_destroy_bg_wrap, ctx, 0); |
2184 | 2193 | vfs_shut (); |
2185 | 2194 | _exit (0); |
2186 | 2195 | } |
diff --git a/src/filegui.c b/src/filegui.c
index 340e12a..e9a31cf 100644
a
|
b
|
check_progress_buttons (FileOpContext *ctx) |
222 | 222 | /* {{{ File progress display routines */ |
223 | 223 | |
224 | 224 | void |
225 | | file_op_context_create_ui (FileOpContext *ctx, int with_eta) |
| 225 | file_op_context_create_ui_without_init (FileOpContext *ctx, int with_eta) |
226 | 226 | { |
227 | 227 | FileOpContextUI *ui; |
228 | 228 | int x_size; |
… |
… |
file_op_context_create_ui (FileOpContext *ctx, int with_eta) |
293 | 293 | label_new (3, FCOPY_GAUGE_X, sixty)); |
294 | 294 | add_widget (ui->op_dlg, ui->file_label[0] = |
295 | 295 | label_new (3, FCOPY_LABEL_X, fifteen)); |
| 296 | } |
| 297 | |
| 298 | void |
| 299 | file_op_context_create_ui (FileOpContext *ctx, int with_eta) |
| 300 | { |
| 301 | FileOpContextUI *ui; |
| 302 | |
| 303 | g_return_if_fail (ctx != NULL); |
| 304 | g_return_if_fail (ctx->ui == NULL); |
| 305 | |
| 306 | file_op_context_create_ui_without_init(ctx, with_eta); |
| 307 | ui = ctx->ui; |
296 | 308 | |
297 | 309 | /* We will manage the dialog without any help, that's why |
298 | 310 | we have to call init_dlg */ |
diff --git a/src/fileopctx.h b/src/fileopctx.h
index 4943e28..305fe63 100644
a
|
b
|
enum OperationMode { |
144 | 144 | /* The following functions are implemented separately by each port */ |
145 | 145 | |
146 | 146 | void file_op_context_create_ui (FileOpContext *ctx, int with_eta); |
| 147 | void file_op_context_create_ui_without_init (FileOpContext *ctx, int with_eta); |
147 | 148 | void file_op_context_destroy_ui (FileOpContext *ctx); |
148 | 149 | |
149 | 150 | FileProgressStatus file_progress_show (FileOpContext *ctx, off_t done, off_t total); |