Ticket #3547: mc-3547-cleanup-internal-filemanager-layout-variables.patch

File mc-3547-cleanup-internal-filemanager-layout-variables.patch, 2.2 KB (added by and, 6 years ago)
  • src/filemanager/layout.c

    From 3c21ec0b27b755e67fbcc8a32d84e12faba0756e Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Fri, 1 Jan 2016 16:05:14 +0000
    Subject: [PATCH] cleanup internal filemanager layout variables
    
    _free_space and _xterm_title never used
    _command_prompt, _keybar_visible, _menubar_visible, _message_visible used within layout_callback() only
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    
    ---
     src/filemanager/layout.c | 18 ++++--------------
     1 file changed, 4 insertions(+), 14 deletions(-)
    
    diff --git a/src/filemanager/layout.c b/src/filemanager/layout.c
    index cb4e1be..2eaaf39 100644
    a b static int old_output_lines; 
    147147 
    148148/* Internal variables */ 
    149149static int equal_split; 
    150 static int _menubar_visible; 
    151150static int _output_lines; 
    152 static gboolean _command_prompt; 
    153 static int _keybar_visible; 
    154 static int _message_visible; 
    155 static gboolean _xterm_title; 
    156 static int _free_space; 
    157151 
    158152static int height; 
    159153 
    static cb_ret_t 
    312306layout_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) 
    313307{ 
    314308    WDialog *h = DIALOG (w); 
     309    gboolean _command_prompt; 
     310    int _keybar_visible; 
     311    int _menubar_visible; 
     312    int _message_visible; 
    315313 
    316314    switch (msg) 
    317315    { 
    layout_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void * 
    340338        _command_prompt = (check_options[2].widget->state & C_BOOL) != 0; 
    341339        _keybar_visible = check_options[3].widget->state & C_BOOL; 
    342340        _message_visible = check_options[4].widget->state & C_BOOL; 
    343         _xterm_title = (check_options[5].widget->state & C_BOOL) != 0; 
    344         _free_space = check_options[6].widget->state & C_BOOL; 
    345341 
    346342        if (mc_global.tty.console_flag != '\0') 
    347343        { 
    init_layout (void) 
    463459    output_lines_label = _("Output lines:"); 
    464460 
    465461    /* save old params */ 
    466     _menubar_visible = menubar_visible; 
    467     _command_prompt = command_prompt; 
    468     _keybar_visible = mc_global.keybar_visible; 
    469     _message_visible = mc_global.message_visible; 
    470     _xterm_title = xterm_title; 
    471     _free_space = free_space; 
    472462    old_output_lines = -1; 
    473463    _output_lines = output_lines; 
    474464