summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-20 02:26:11 +0100
committerhut <hut@lavabit.com>2009-12-20 02:26:11 +0100
commit365ba9c5caa929d4e3a5afee008a2d4a6d85e386 (patch)
tree3b915a97436179c0d6491dda307191284443eaf7 /ranger
parent7d9ae552154dc4f0214a80cbd1e0fd17efba1e6c (diff)
downloadranger-365ba9c5caa929d4e3a5afee008a2d4a6d85e386.tar.gz
Added option for autoloading previews.
If it is false, you have to enter the directory once to see a preview
Diffstat (limited to 'ranger')
-rw-r--r--ranger/defaults/options.py2
-rw-r--r--ranger/gui/widgets/filelist.py16
-rw-r--r--ranger/shared/settings.py2
3 files changed, 13 insertions, 7 deletions
diff --git a/ranger/defaults/options.py b/ranger/defaults/options.py
index 3bd4ad02..d466b5dc 100644
--- a/ranger/defaults/options.py
+++ b/ranger/defaults/options.py
@@ -10,4 +10,4 @@ scroll_offset = 2
 directories_first = True
 preview_files = False
 max_history_size = 20
-
+auto_load_preview = True
diff --git a/ranger/gui/widgets/filelist.py b/ranger/gui/widgets/filelist.py
index f5b69e26..1e5c748d 100644
--- a/ranger/gui/widgets/filelist.py
+++ b/ranger/gui/widgets/filelist.py
@@ -111,11 +111,17 @@ class FileList(Widget):
 		self.target.use()
 
 		if not self.target.content_loaded:
-			self.color(base_color)
-			self.win.addnstr(self.y, self.x, "...", self.wid)
-			self.color_reset()
-			self.postpone_drawing = True
-			return
+			if self.settings.auto_load_preview:
+				self.color(base_color)
+				self.win.addnstr(self.y, self.x, "...", self.wid)
+				self.color_reset()
+				self.postpone_drawing = True
+				return
+			else:
+				self.color(base_color, 'error')
+				self.win.addnstr(self.y, self.x, "not loaded", self.wid)
+				self.color_reset()
+				return
 
 		self.target.load_content_if_outdated()
 		self.target.sort_if_outdated()
diff --git a/ranger/shared/settings.py b/ranger/shared/settings.py
index 46dc77e8..5541b191 100644
--- a/ranger/shared/settings.py
+++ b/ranger/shared/settings.py
@@ -1,7 +1,7 @@
 ALLOWED_SETTINGS = """
 show_hidden scroll_offset directories_first
 preview_files max_history_size colorscheme
-collapse_preview
+collapse_preview auto_load_preview
 apps keys
 """.split()
 
bong/suckless/dwm/commit/config.default.h?h=3.8&id=f196b71e4d543e7d8c4fd6398cf1bedd3dafc024'>f196b71 ^
3794c62 ^
f196b71 ^
3794c62 ^
f196b71 ^
3794c62 ^

338c083 ^
3794c62 ^
3d1d75a ^
f196b71 ^
cac492b ^
3794c62 ^
f196b71 ^

b515765 ^
b515765 ^
19dcbc5 ^
2c477cf ^
0ea0343 ^
2c477cf ^
0ea0343 ^
35f08f4 ^
2122e39 ^

0ea0343 ^

2c477cf ^

338c083 ^
2c477cf ^







































b515765 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97