about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-03 14:36:01 +0200
committerhut <hut@lavabit.com>2009-07-03 14:36:01 +0200
commit5c46eff7ddabf2dabc380b1e6a834e42bb30a385 (patch)
tree1e41a633b5f923cee179d2adf550b6cbaea4eb8d
parentbeee98067bb9db599a87b4a62cd091b07e024ea1 (diff)
downloadranger-5c46eff7ddabf2dabc380b1e6a834e42bb30a385.tar.gz
dynamically reload file types when typing ^R
-rw-r--r--code/fm.rb7
-rwxr-xr-xranger.rb2
2 files changed, 7 insertions, 2 deletions
diff --git a/code/fm.rb b/code/fm.rb
index 84b9835f..67d6829d 100644
--- a/code/fm.rb
+++ b/code/fm.rb
@@ -76,10 +76,17 @@ module Fm
 		end
 	end
 
+	def reload_types()
+		load 'data/types.rb'
+		load 'data/apps.rb'
+	end
+
 	def boot_up(pwd=nil)
 		pwd ||= @pwd.path || Dir.getwd
 		Scheduler.reset
 
+		reload_types
+
 		@dirs = Hash.new() do |hash, key|
 			hash[key] = newdir = Directory.new(key)
 #			newdir.schedule
diff --git a/ranger.rb b/ranger.rb
index 36b9656d..33af212f 100755
--- a/ranger.rb
+++ b/ranger.rb
@@ -45,8 +45,6 @@ Option = Struct.new(*opt.keys).new(*opt.values)
 opt = nil
 
 load 'ranger.conf'
-load 'data/types.rb'
-load 'data/apps.rb'
 load 'data/colorscheme/' + Option.colorscheme + '.rb'
 load 'data/screensaver/clock.rb'