Ticket #2076: mc_copy-move-width.patch

File mc_copy-move-width.patch, 1.5 KB (added by oernii, 11 years ago)

Patch increases the width of the copy/move dialogs to almost terminal width.

  • lib/widget/gauge.c

    diff --git a/lib/widget/gauge.c b/lib/widget/gauge.c
    index 1c7355c..9da2694 100644
    a b  
    5050/*** file scope macro definitions ****************************************************************/ 
    5151 
    5252/* Currently width is hardcoded here for text mode */ 
    53 #define gauge_len 47 
     53#define gauge_len COLS-20 
    5454 
    5555/*** file scope type declarations ****************************************************************/ 
    5656 
  • src/filemanager/filegui.c

    diff --git a/src/filemanager/filegui.c b/src/filemanager/filegui.c
    index cd4019f..91f71b9 100644
    a b int classic_progressbar = 1; 
    197197/* Hack: the vfs code should not rely on this */ 
    198198#define WITH_FULL_PATHS 1 
    199199 
    200 #define truncFileString(ui, s)       str_trunc (s, 52) 
    201 #define truncFileStringSecure(ui, s) path_trunc (s, 52) 
     200#define truncFileString(ui, s)       str_trunc (s, COLS-30) 
     201#define truncFileStringSecure(ui, s) path_trunc (s, COLS-30) 
    202202 
    203203/*** file scope type declarations ****************************************************************/ 
    204204 
    file_op_context_create_ui_without_init (FileOpContext * ctx, gboolean with_eta, 
    655655    skip_button_width = str_term_width1 (skip_button_label) + 3; 
    656656    buttons_width = abort_button_width + skip_button_width + 1; 
    657657 
    658     dlg_width = max (58, buttons_width + 6); 
     658    dlg_width = max (COLS - 8, buttons_width + 6); 
    659659    dlg_height = 17;            /* will be adjusted later */ 
    660660 
    661661    ui = g_new0 (FileOpContextUI, 1);