From e3744f401f418c4c3a4a961373ce32e385645a7b Mon Sep 17 00:00:00 2001 From: hut Date: Wed, 19 May 2010 22:47:25 +0200 Subject: defaults.apps: swap feh modes 0 and 11 --- ranger/defaults/apps.py | 29 ++++++++++++++--------------- 1 file 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): -- cgit 1.4.1-2-gfad0