From 3fb63c55ca94393e699f692a4a535ef4ce5c9c64 Mon Sep 17 00:00:00 2001 From: Slava Zanko Date: Thu, 11 Mar 2010 17:59:08 +0200 Subject: [PATCH 1/2] Ticket #2099: Delete dialog broken when verbose mode is switched off Test case: 1. go to Options/Configuration 2. switch Verbose operation off 3. point at a directory, press F8 You see broken delete dialog. Signed-off-by: Slava Zanko --- src/filegui.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/filegui.c b/src/filegui.c index 0fbae3002..8895de50e 100644 --- a/src/filegui.c +++ b/src/filegui.c @@ -285,6 +285,7 @@ file_op_context_create_ui_without_init (FileOpContext * ctx, gboolean with_eta, break; case FILEGUI_DIALOG_DELETE_ITEM: total_reserve = -5; + minus = 0; break; } From 320803812ba2d352456e1e4b22ce91cfa0e0d799 Mon Sep 17 00:00:00 2001 From: Slava Zanko Date: Fri, 12 Mar 2010 00:09:02 +0200 Subject: [PATCH 2/2] Fixed fileOperation dialog height for copy/move operations (with verbose mode switched off) Signed-off-by: Slava Zanko --- src/filegui.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/filegui.c b/src/filegui.c index 8895de50e..9d064ff91 100644 --- a/src/filegui.c +++ b/src/filegui.c @@ -249,7 +249,7 @@ file_op_context_create_ui_without_init (FileOpContext * ctx, gboolean with_eta, filegui_dialog_type_t dialog_type) { FileOpContextUI *ui; - int minus, total_reserve = 0; + int minus = 0, total_reserve = 0; const char *abort_button_label = N_("&Abort"); const char *skip_button_label = N_("&Skip"); int abort_button_width, skip_button_width, buttons_width; @@ -273,15 +273,16 @@ file_op_context_create_ui_without_init (FileOpContext * ctx, gboolean with_eta, ctx->ui = ui; ctx->dialog_type = dialog_type; - minus = verbose ? 0 : 3; switch (dialog_type) { case FILEGUI_DIALOG_ONE_ITEM: total_reserve = 0; + minus = verbose ? 0 : 2; break; case FILEGUI_DIALOG_MULTI_ITEM: total_reserve = 5; + minus = verbose ? 0 : 7; break; case FILEGUI_DIALOG_DELETE_ITEM: total_reserve = -5; @@ -313,7 +314,7 @@ file_op_context_create_ui_without_init (FileOpContext * ctx, gboolean with_eta, NORMAL_BUTTON, skip_button_label, NULL)); - if (dialog_type == FILEGUI_DIALOG_MULTI_ITEM) + if (verbose && dialog_type == FILEGUI_DIALOG_MULTI_ITEM) { add_widget (ui->op_dlg, hline_new (8, 1, dlg_width - 2)); @@ -511,6 +512,9 @@ file_progress_show_total (FileOpTotalContext * tctx, FileOpContext * ctx, double struct timeval tv_current; FileOpContextUI *ui; + if (!verbose) + return; + if (ctx->dialog_type != FILEGUI_DIALOG_MULTI_ITEM || ctx->ui == NULL) return;