From 14c13cbd17a1d10bf4101de518e1908905d10e2c Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Mon, 10 Oct 2016 19:18:05 +0200 Subject: 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. --- ranger/core/fm.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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')) -- cgit 1.4.1-2-gfad0