diff options
author | Emanuel Guevel <guevel.emanuel@gmail.com> | 2013-02-02 00:31:00 +0100 |
---|---|---|
committer | Emanuel Guevel <guevel.emanuel@gmail.com> | 2013-02-02 01:02:47 +0100 |
commit | 71c81ff14f1be1f02f70216aa9a3a0b0e663bb52 (patch) | |
tree | 181e8f08729db26ff471e45b310293c28fade12a /ranger | |
parent | 3e9db3e70fc0093a486cfca0db7306054d45d8f1 (diff) | |
download | ranger-71c81ff14f1be1f02f70216aa9a3a0b0e663bb52.tar.gz |
Add 'preview_images' setting
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/container/settingobject.py | 1 | ||||
-rw-r--r-- | ranger/core/actions.py | 4 | ||||
-rw-r--r-- | ranger/gui/widgets/browsercolumn.py | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/ranger/container/settingobject.py b/ranger/container/settingobject.py index 431d26e3..7d715f38 100644 --- a/ranger/container/settingobject.py +++ b/ranger/container/settingobject.py @@ -26,6 +26,7 @@ ALLOWED_SETTINGS = { 'mouse_enabled': bool, 'padding_right': bool, 'preview_directories': bool, + 'preview_images': bool, 'preview_files': bool, 'preview_script': (str, type(None)), 'save_console_history': bool, diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 2300aa96..80db1aa5 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -777,7 +777,7 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): return pager = self.ui.open_embedded_pager() - if self.thisfile.is_image(): + if self.settings.preview_images and self.thisfile.is_image(): pager.set_image(self.thisfile.realpath) else: pager.set_source(self.thisfile.get_preview_source(pager.wid, pager.hei)) @@ -796,7 +796,7 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): pager = self.ui.browser.pager path = file.realpath - if file.is_image(): + if self.settings.preview_images and file.is_image(): pager.set_image(path) return None diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py index 94c71929..02c2a5f0 100644 --- a/ranger/gui/widgets/browsercolumn.py +++ b/ranger/gui/widgets/browsercolumn.py @@ -168,7 +168,7 @@ class BrowserColumn(Pager): Pager.close(self) return - if self.target.is_image(): + if self.fm.settings.preview_images and self.target.is_image(): self.set_image(self.target.realpath) Pager.draw(self) else: |