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; |
147 | 147 | |
148 | 148 | /* Internal variables */ |
149 | 149 | static int equal_split; |
150 | | static int _menubar_visible; |
151 | 150 | static 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; |
157 | 151 | |
158 | 152 | static int height; |
159 | 153 | |
… |
… |
static cb_ret_t |
312 | 306 | layout_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) |
313 | 307 | { |
314 | 308 | WDialog *h = DIALOG (w); |
| 309 | gboolean _command_prompt; |
| 310 | int _keybar_visible; |
| 311 | int _menubar_visible; |
| 312 | int _message_visible; |
315 | 313 | |
316 | 314 | switch (msg) |
317 | 315 | { |
… |
… |
layout_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void * |
340 | 338 | _command_prompt = (check_options[2].widget->state & C_BOOL) != 0; |
341 | 339 | _keybar_visible = check_options[3].widget->state & C_BOOL; |
342 | 340 | _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; |
345 | 341 | |
346 | 342 | if (mc_global.tty.console_flag != '\0') |
347 | 343 | { |
… |
… |
init_layout (void) |
463 | 459 | output_lines_label = _("Output lines:"); |
464 | 460 | |
465 | 461 | /* 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; |
472 | 462 | old_output_lines = -1; |
473 | 463 | _output_lines = output_lines; |
474 | 464 | |