summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-05-19 22:47:25 +0200
committerhut <hut@lavabit.com>2010-05-19 22:47:25 +0200
commite3744f401f418c4c3a4a961373ce32e385645a7b (patch)
treec3ba17075b5872efb5f7be1980ea656b328cebbb /ranger
parentc512259aec5a7abdbcec48a3c20cb2a0982c4d65 (diff)
downloadranger-e3744f401f418c4c3a4a961373ce32e385645a7b.tar.gz
defaults.apps: swap feh modes 0 and 11
Diffstat (limited to 'ranger')
-rw-r--r--ranger/defaults/apps.py29
1 files changed, 14 insertions, 15 deletions
diff --git a/ranger/defaults/apps.py b/ranger/defaults/apps.py
index 4dd3bde5..026ff271 100644
--- a/ranger/defaults/apps.py
+++ b/ranger/defaults/apps.py
@@ -142,21 +142,20 @@ class CustomApplications(Applications):
 			return tup('feh', arg[c.mode], c.file.path)
 		if c.mode is 4:
 			return self.app_gimp(c)
-		if len(c.files) > 1:
-			return tup('feh', *c)
-
-		try:
-			from collections import deque
-
-			directory = self.fm.env.get_directory(c.file.dirname)
-			images = [f.path for f in directory.files if f.image]
-			position = images.index(c.file.path)
-			deq = deque(images)
-			deq.rotate(-position)
-
-			return tup('feh', *deq)
-		except:
-			return tup('feh', *c)
+		if c.mode is 11:
+			if len(c.files) > 1:
+				return tup('feh', *c)
+			else:
+				from collections import deque
+
+				directory = self.fm.env.get_directory(c.file.dirname)
+				images = [f.path for f in directory.files if f.image]
+				position = images.index(c.file.path)
+				deq = deque(images)
+				deq.rotate(-position)
+
+				return tup('feh', *deq)
+		return tup('feh', *c)
 
 	@depends_on('aunpack')
 	def app_aunpack(self, c):
_history.py?h=v1.5.1&id=3dbefa71785bf61b8f28d4a780064f3f4e04dcb5'>3dbefa71 ^
22bb7e35 ^

3dbefa71 ^


22bb7e35 ^
3dbefa71 ^
22bb7e35 ^
3dbefa71 ^
22bb7e35 ^


3dbefa71 ^
22bb7e35 ^








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