From 44aec1047a2d7e775a4802a9b9c3968149797651 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 1 Jan 2010 23:21:09 +0100 Subject: settings: corrected preview_files option --- ranger/defaults/options.py | 2 +- ranger/gui/widgets/browsercolumn.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ranger/defaults/options.py b/ranger/defaults/options.py index 27d8b5d4..fb1358e6 100644 --- a/ranger/defaults/options.py +++ b/ranger/defaults/options.py @@ -6,7 +6,7 @@ colorscheme = colorschemes.default max_history_size = 20 scroll_offset = 2 max_dirsize_for_autopreview = None -preview_files = False +preview_files = True sort = 'basename' reverse = False diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py index 5fb61704..6ab49c62 100644 --- a/ranger/gui/widgets/browsercolumn.py +++ b/ranger/gui/widgets/browsercolumn.py @@ -105,7 +105,7 @@ class BrowserColumn(Pager, Widget): self.need_redraw = False def _preview_this_file(self, target): - return target.document and not self.settings.preview_files + return target.document and self.settings.preview_files def _draw_file(self): """Draw a preview of the file, if the settings allow it""" -- cgit 1.4.1-2-gfad0 log blame commit diff stats
path: root/ranger.py
blob: 5652ba69f91801a14af034f92305d16483c33959 (plain) (tree)
1
2
3
4
5
6
                    
              
 

                                                                 
 











                                                                       
 

                                                                              

                                                                 
     
               
                                          
                                                                                                
            
                                                                                                         
          


                                                                

        
 

          

                                                                

                                                           

                                                              
                              
    
                                        
                   
                                                              




                                                               
     
                        
#!/usr/bin/python -O
# coding=utf-8
#
# Ranger: Explore your forest of files from inside your terminal
# Copyright (C) 2009, 2010  Roman Zimbelmann <romanz@lavabit.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# ----------------------------------------------------------------------------
#
# An embedded shell script. It allows you to change the directory
# after you exit ranger by starting it with: source ranger ranger
"""":
if [ $1 ]; then
	if [ -z "$XDG_CONFIG_HOME" ]; then
		"$@" --fail-unless-cd && cd "$(grep \^\' ~/.config/ranger/bookmarks | cut -b3-)"
	else
		"$@" --fail-unless-cd && cd "$(grep \^\' "$XDG_CONFIG_HOME"/ranger/bookmarks | cut -b3-)"
	fi
else
	echo "usage: source path/to/ranger.py path/to/ranger.py"
fi
return 1
"""

import sys

# Redefine the docstring, since the previous one was hijacked to
# embed a shellscript.
__doc__ = """Ranger - file browser for the unix terminal"""

# Importing the main method may fail if the ranger directory
# is neither in the same directory as this file, nor in one of
# pythons global import paths.
try:
	from ranger.__main__ import main
except ImportError:
	if '-d' not in sys.argv and '--debug' not in sys.argv:
		print("Can't import the main module.")
		print("To run an uninstalled copy of ranger,")
		print("launch ranger.py in the top directory.")
	else:
		raise
else:
	sys.exit(main())