1
1

Merge branch '2099_fileop_delete_dialog'

* 2099_fileop_delete_dialog:
  Fixed fileOperation dialog height for copy/move operations (with verbose mode switched off)
  Ticket #2099: Delete dialog broken when verbose mode is switched off
Этот коммит содержится в:
Slava Zanko 2010-03-12 10:05:44 +02:00
родитель 6f76ccac03 320803812b
Коммит 6cacfb013d

Просмотреть файл

@ -249,7 +249,7 @@ file_op_context_create_ui_without_init (FileOpContext * ctx, gboolean with_eta,
filegui_dialog_type_t dialog_type) filegui_dialog_type_t dialog_type)
{ {
FileOpContextUI *ui; FileOpContextUI *ui;
int minus, total_reserve = 0; int minus = 0, total_reserve = 0;
const char *abort_button_label = N_("&Abort"); const char *abort_button_label = N_("&Abort");
const char *skip_button_label = N_("&Skip"); const char *skip_button_label = N_("&Skip");
int abort_button_width, skip_button_width, buttons_width; int abort_button_width, skip_button_width, buttons_width;
@ -273,18 +273,20 @@ file_op_context_create_ui_without_init (FileOpContext * ctx, gboolean with_eta,
ctx->ui = ui; ctx->ui = ui;
ctx->dialog_type = dialog_type; ctx->dialog_type = dialog_type;
minus = verbose ? 0 : 3;
switch (dialog_type) switch (dialog_type)
{ {
case FILEGUI_DIALOG_ONE_ITEM: case FILEGUI_DIALOG_ONE_ITEM:
total_reserve = 0; total_reserve = 0;
minus = verbose ? 0 : 2;
break; break;
case FILEGUI_DIALOG_MULTI_ITEM: case FILEGUI_DIALOG_MULTI_ITEM:
total_reserve = 5; total_reserve = 5;
minus = verbose ? 0 : 7;
break; break;
case FILEGUI_DIALOG_DELETE_ITEM: case FILEGUI_DIALOG_DELETE_ITEM:
total_reserve = -5; total_reserve = -5;
minus = 0;
break; break;
} }
@ -312,7 +314,7 @@ file_op_context_create_ui_without_init (FileOpContext * ctx, gboolean with_eta,
NORMAL_BUTTON, skip_button_label, NULL)); 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)); add_widget (ui->op_dlg, hline_new (8, 1, dlg_width - 2));
@ -510,6 +512,9 @@ file_progress_show_total (FileOpTotalContext * tctx, FileOpContext * ctx, double
struct timeval tv_current; struct timeval tv_current;
FileOpContextUI *ui; FileOpContextUI *ui;
if (!verbose)
return;
if (ctx->dialog_type != FILEGUI_DIALOG_MULTI_ITEM || ctx->ui == NULL) if (ctx->dialog_type != FILEGUI_DIALOG_MULTI_ITEM || ctx->ui == NULL)
return; return;