From 03d7f28e1e73a61e4d3524eec26bbab441295fdf Mon Sep 17 00:00:00 2001 From: hut Date: Sat, 1 Oct 2011 22:32:50 +0200 Subject: core.shared: silence a warning when using ranger as root --- ranger/core/shared.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ranger/core/shared.py b/ranger/core/shared.py index 38dc7cdd..ce7c3184 100644 --- a/ranger/core/shared.py +++ b/ranger/core/shared.py @@ -63,7 +63,8 @@ class SettingsAware(Awareness): settings.signal_bind('setopt.preview_script', after_setting_preview_script, priority=1) def after_setting_use_preview_script(signal): - if signal.fm.settings.preview_script is None and signal.value: + if signal.fm.settings.preview_script is None and signal.value \ + and not signal.previous: signal.fm.notify("Preview script undefined or not found!", bad=True) settings.signal_bind('setopt.use_preview_script', -- cgit 1.4.1-2-gfad0