summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/fsobject/file.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ranger/fsobject/file.py b/ranger/fsobject/file.py
index 33b4e3d3..d0002a56 100644
--- a/ranger/fsobject/file.py
+++ b/ranger/fsobject/file.py
@@ -77,6 +77,8 @@ class File(FileSystemObject):
 		return False
 
 	def has_preview(self):
+		if self.fm.settings.preview_script:
+			return True
 		if not self.fm.settings.preview_files:
 			return False
 		if self.is_socket or self.is_fifo or self.is_device:
@@ -84,7 +86,7 @@ class File(FileSystemObject):
 		if not self.accessible:
 			return False
 		if self.image or self.container:
-			return True
+			return False
 		if PREVIEW_WHITELIST.search(self.basename):
 			return True
 		if PREVIEW_BLACKLIST.search(self.basename):
er/commit/setup.py?h=v1.8.1&id=8a5944e1bd52dd749c34a5b4eda401902531175a'>8a5944e1 ^
3cd8a402 ^
27eec7c6 ^
34e28e61 ^
d1a1173d ^






b3660b9a ^
d1a1173d ^
3b96a37f ^
0267251a ^

3b96a37f ^



4feb2e15 ^
666cb102 ^
b38b4dd1 ^
3b96a37f ^
3b96a37f ^
8a5944e1 ^

3cd8a402 ^
c0f2fc72 ^
3cd8a402 ^
d1a1173d ^








d1a1173d ^
e6b847b3 ^
225aa78f ^
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
                     

                                                                 
 
                     
              

             
                        

                                                                       
 
                          
                         






                                            
                                       
                                                    
                    

                                        



                                 
                             
                                
                              
                                          
                                                    

                                                                
                                                              
                                                                
          








                                                            
                               
                                       
                                    
#!/usr/bin/env python
# This file is part of ranger, the console file manager.
# License: GNU GPL version 3, see the file "AUTHORS" for details.

import distutils.core
import os.path
import ranger

def _findall(directory):
    return [os.path.join(directory, f) for f in os.listdir(directory) \
            if os.path.isfile(os.path.join(directory, f))]

if __name__ == '__main__':
    distutils.core.setup(
        name='ranger',
        description='Vim-like file manager',
        long_description=ranger.__doc__,
        version=ranger.__version__,
        author=ranger.__author__,
        author_email=ranger.__email__,
        license=ranger.__license__,
        url='http://ranger.nongnu.org',
        scripts=['scripts/ranger', 'scripts/rifle'],
        data_files=[
            ('share/applications',
                ['doc/ranger.desktop']),
            ('share/man/man1',
                ['doc/ranger.1',
                 'doc/rifle.1']),
            ('share/doc/ranger',
                ['README.md',
                 'CHANGELOG.md',
                 'HACKING.md',
                 'doc/colorschemes.txt']),
            ('share/doc/ranger/config/colorschemes',
                _findall('doc/config/colorschemes')),
            ('share/doc/ranger/config', _findall('doc/config')),
            ('share/doc/ranger/tools', _findall('doc/tools')),
            ('share/doc/ranger/examples', _findall('examples')),
        ],
        package_data={'ranger': ['data/*', 'config/rc.conf',
            'config/rifle.conf']},
        packages=('ranger',
                  'ranger.api',
                  'ranger.colorschemes',
                  'ranger.container',
                  'ranger.core',
                  'ranger.config',
                  'ranger.ext',
                  'ranger.gui',
                  'ranger.gui.widgets',
                  'ranger.ext.vcs'))