From ef81960bdaab374e1f6a24576741219bc51cda7c Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 14 Dec 2009 18:52:38 +0100 Subject: added an option for collapse_preview --- ranger/defaults/options.py | 1 + ranger/gui/widgets/filelistcontainer.py | 2 +- ranger/shared/settings.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ranger/defaults/options.py b/ranger/defaults/options.py index f78d0a81..3bd4ad02 100644 --- a/ranger/defaults/options.py +++ b/ranger/defaults/options.py @@ -4,6 +4,7 @@ from ranger import colorschemes colorscheme = colorschemes.default show_hidden = False +collapse_preview = True scroll_offset = 2 directories_first = True diff --git a/ranger/gui/widgets/filelistcontainer.py b/ranger/gui/widgets/filelistcontainer.py index 594d0530..fa4ec989 100644 --- a/ranger/gui/widgets/filelistcontainer.py +++ b/ranger/gui/widgets/filelistcontainer.py @@ -58,7 +58,7 @@ class FileListContainer(Widget, DisplayableContainer): def poke(self): DisplayableContainer.poke(self) - if self.preview: + if self.settings.collapse_preview and self.preview: has_preview = self.container[-1].has_preview() if self.preview_available != has_preview: self.preview_available = has_preview diff --git a/ranger/shared/settings.py b/ranger/shared/settings.py index 820e81b0..46dc77e8 100644 --- a/ranger/shared/settings.py +++ b/ranger/shared/settings.py @@ -1,6 +1,7 @@ ALLOWED_SETTINGS = """ show_hidden scroll_offset directories_first preview_files max_history_size colorscheme +collapse_preview apps keys """.split() -- cgit 1.4.1-2-gfad0