about summary refs log tree commit diff stats
path: root/code/draw.rb
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-03 14:16:24 +0200
committerhut <hut@lavabit.com>2009-07-03 14:16:24 +0200
commit01104f4a929dbbf37366f40e5f45227304f3d7d6 (patch)
treecd62dff6e9015a396c0efa606603110fd30a3014 /code/draw.rb
parent2800fd920b9c400ba178c94c77ae77c999f28849 (diff)
downloadranger-01104f4a929dbbf37366f40e5f45227304f3d7d6.tar.gz
put options where they belong. in a config file
Diffstat (limited to 'code/draw.rb')
-rw-r--r--code/draw.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/code/draw.rb b/code/draw.rb
index 75f54a88..aaca6253 100644
--- a/code/draw.rb
+++ b/code/draw.rb
@@ -5,7 +5,7 @@ module Fm
 
 	def column_put_file(n, file)
 		i = 0
-		if OPTIONS['preview'] and OPTIONS['filepreview'] and file.path !~ DONT_PREVIEW_THESE_FILES
+		if Option.preview and Option.file_preview and file.path !~ DONT_PREVIEW_THESE_FILES
 			m = lines - 2
 			attr_set(Color.base)
 			left, wid = get_boundaries(n)
@@ -122,7 +122,7 @@ module Fm
 				puti l, left, fn[0, wid-1].ljust(wid+1)
 			end
 
-			if infos and OPTIONS['wide_bar']
+			if infos and Option.wide_bar
 				attr_at(l, left-1, wid+1, mycolor.send(clrname))
 			else
 				attr_at(l, left, fn.size.limit(wid-1), mycolor.send(clrname))
@@ -161,7 +161,7 @@ module Fm
 			
 		when 1
 			q = cols / 8
-			if !OPTIONS['preview']# or (!OPTIONS['filepreview'] and !currentfile.dir?)
+			if !Option.preview# or (!Option.filepreview and !currentfile.dir?)
 				return q, 2*q
 #			elsif currentfile.path != DONT_PREVIEW_THESE_FILES
 #				return q, 2*q
@@ -170,10 +170,10 @@ module Fm
 			end
 
 		when 2
-			if !OPTIONS['preview']
+			if !Option.preview
 				q = cols * 0.375 - 1
 				w = @path.last.width.limit(cols * 0.625, cols/8)
-#			elsif currentfile.path =~ DONT_PREVIEW_THESE_FILES or (!OPTIONS['filepreview'] and !currentfile.dir?)
+#			elsif currentfile.path =~ DONT_PREVIEW_THESE_FILES or (!Option.filepreview and !currentfile.dir?)
 #				q = cols / 4
 #				w = @path.last.width.limit(cols * 0.75, cols/8)
 			else
@@ -250,7 +250,7 @@ module Fm
 #			bold false
 
 			begin
-				if OPTIONS['preview']
+				if Option.preview
 					if cf.dir?
 						put_directory(3, @dirs[cf.path])
 					elsif cf.file?
@@ -284,7 +284,7 @@ module Fm
 			when 'S'
 				puti btm, "Sort by (n)ame (s)ize (m)time (c)time (CAPITAL:reversed)"
 			when 't'
-				puti btm, "Toggle (h)idden_files (d)irs_first (c)olor (f)ilepreview (p)review (w)idebar"
+				puti btm, "Toggle (h)idden_files (d)irs_first (f)ilepreview (p)review (w)idebar"
 			else
 				attr_set(Color.base)
 				attr_set(Color.info)