Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide mini_status panel option enforced #145

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
*.o
*.a
**.po
*.lo
*.la
*~
*.cache
*.tar.gz
misc/ext.d/doc.sh
misc/ext.d/misc.sh
misc/ext.d/text.sh
misc/ext.d/web.sh
misc/mc.charsets
misc/mc.menu
misc/mcedit.menu
misc/syntax/Syntax
src/man2hlp/man2hlp
src/vfs/extfs/helpers/uc1541
src/vfs/extfs/helpers/ulib
tests/src/editor/test-data.txt
tests/src/vfs/extfs/helpers-list/data/config.sh
ABOUT-NLS
Make.common
Makefile
Expand Down
35 changes: 14 additions & 21 deletions src/filemanager/panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,10 @@ display_total_marked_size (const WPanel * panel, int y, int x, gboolean size_onl
*/
widget_move (w, y, x);
tty_setcolor (MARKED_COLOR);
tty_printf (" %s ", buf);

if (panels_options.show_mini_info) {
tty_printf (" %s ", buf);
}
}

/* --------------------------------------------------------------------------------------------- */
Expand Down Expand Up @@ -1309,31 +1312,21 @@ show_dir (const WPanel * panel)
tty_printf (" %s ", str_term_trim (tmp, MIN (MAX (w->cols - 12, 0), w->cols)));
g_free (tmp);

if (!panels_options.show_mini_info)
if (panel->marked == 0)
{
if (panel->marked == 0)
/* Show size of curret file in the bottom of panel */
if (S_ISREG (panel->dir.list[panel->selected].st.st_mode))
{
/* Show size of curret file in the bottom of panel */
if (S_ISREG (panel->dir.list[panel->selected].st.st_mode))
{
char buffer[BUF_SMALL];
char buffer[BUF_SMALL];

g_snprintf (buffer, sizeof (buffer), " %s ",
size_trunc_sep (panel->dir.list[panel->selected].st.st_size,
panels_options.kilobyte_si));
tty_setcolor (NORMAL_COLOR);
widget_move (w, w->lines - 1, 4);
tty_print_string (buffer);
}
}
else
{
/* Show total size of marked files
* In the bottom of panel, display size only. */
display_total_marked_size (panel, w->lines - 1, 2, TRUE);
g_snprintf (buffer, sizeof (buffer), " %s ",
size_trunc_sep (panel->dir.list[panel->selected].st.st_size,
panels_options.kilobyte_si));
tty_setcolor (NORMAL_COLOR);
widget_move (w, w->lines - 1, 4);
}
}

show_free_space (panel);

if (panel->active)
Expand Down