diff options
author | Wojciech Siewierski <wojciech.siewierski@onet.pl> | 2016-10-10 19:18:05 +0200 |
---|---|---|
committer | Wojciech Siewierski <wojciech.siewierski@onet.pl> | 2016-10-10 19:18:05 +0200 |
commit | 14c13cbd17a1d10bf4101de518e1908905d10e2c (patch) | |
tree | 157200206f6895d5f616b39d6230c166865fc481 /ranger | |
parent | 041856327c0d9b1fe3f26c5447995fda477c657f (diff) | |
download | ranger-14c13cbd17a1d10bf4101de518e1908905d10e2c.tar.gz |
Update the image preview method upon setting it in runtime
Previously the displayer was not changed after the initialization, so only the value read from rc.conf was used.
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/core/fm.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ranger/core/fm.py b/ranger/core/fm.py index 8168b7d6..d5bdc66e 100644 --- a/ranger/core/fm.py +++ b/ranger/core/fm.py @@ -15,6 +15,7 @@ import sys import ranger.api from ranger.core.actions import Actions from ranger.core.tab import Tab +from ranger.container import settings from ranger.container.tags import Tags, TagsDummy from ranger.gui.ui import UI from ranger.container.bookmarks import Bookmarks @@ -97,7 +98,13 @@ class FM(Actions, SignalDispatcher): rifleconf = self.relpath('config/rifle.conf') self.rifle = Rifle(rifleconf) self.rifle.reload_config() - self.image_displayer = self._get_image_displayer() + + def set_image_displayer(): + self.image_displayer = self._get_image_displayer() + set_image_displayer() + self.settings.signal_bind('setopt.preview_images_method', + set_image_displayer, + priority=settings.SIGNAL_PRIORITY_AFTER_SYNC) if not ranger.arg.clean and self.tags is None: self.tags = Tags(self.confpath('tagged')) |