about summary refs log tree commit diff stats
path: root/code
diff options
context:
space:
mode:
Diffstat (limited to 'code')
-rw-r--r--code/action.rb4
-rw-r--r--code/bars.rb61
-rw-r--r--code/color.rb2
3 files changed, 7 insertions, 60 deletions
diff --git a/code/action.rb b/code/action.rb
index 7a0a9ac7..48fd6f42 100644
--- a/code/action.rb
+++ b/code/action.rb
@@ -12,14 +12,14 @@ module Action
 	def copy(files, path)
 		files = [files] unless files.is_a? Array
 		unless files.empty?
-			CopyBar2.new(files, path)
+			CopyBar.new(files, path)
 		end
 	end
 
 	def move(files, path)
 		files = [files] unless files.is_a? Array
 		unless files.empty?
-			MoveBar2.new(files, path)
+			MoveBar.new(files, path)
 		end
 	end
 
diff --git a/code/bars.rb b/code/bars.rb
index 40f7689e..5edb3604 100644
--- a/code/bars.rb
+++ b/code/bars.rb
@@ -1,57 +1,4 @@
-#class Bar
-#	def initialize( text = '' )
-#		@text = text
-#		@text_prefix = nil
-#		@max = 0
-#		@done = 0
-#		@counter = 0
-#		@thread = nil
-#		@update_proc = nil
-#		Fm.bar_add(self)
-#	end
-#
-#	def kill(evil = true)
-#		Fm.bar_del(self)
-#		Fm.force_update
-#
-#		@thread.kill
-#	end
-#
-#	def update(&block)
-#		if block
-#			@update_proc = block
-#		elsif @update_proc
-#			@update_proc.call(self)
-#		end
-#	end
-#
-#	def set_text_prefix(text)
-#		@text_prefix = text
-#	end
-#	def set_text(text)
-#		@text_prefix = nil
-#		@text = text
-#	end
-#	alias text= set_text
-#
-#	attr_accessor :thread, :counter, :max
-#end
-#
-#class CopyBar < Bar
-#	def initialize( text = '' )
-#		super
-#
-#		@update_proc = proc do |b|
-#			begin
-#				b.done = File.size(fname).to_f / finished
-#			rescue
-#				b.done = 0
-#			end
-#		end
-#	end
-#end
-
-class Bar2
+class Bar
 	def kill(evil = true)
 		Fm.bar_del(self)
 		Fm.force_update
@@ -90,7 +37,7 @@ class Bar2
 	end
 end
 
-class CopyOrMoveBar < Bar2
+class CopyOrMoveBar < Bar
 	def initialize(files, path)
 		path = path.path unless path.is_a? String
 		Fm.bar_add(self)
@@ -116,7 +63,7 @@ class CopyOrMoveBar < Bar2
 	end
 end
 
-class CopyBar2 < CopyOrMoveBar
+class CopyBar < CopyOrMoveBar
 	def run_operation(file, path)
 		if File.directory?(file)
 			FileUtils.cp_r_in_bar(self, file, path)
@@ -126,7 +73,7 @@ class CopyBar2 < CopyOrMoveBar
 	end
 end
 
-class MoveBar2 < CopyOrMoveBar
+class MoveBar < CopyOrMoveBar
 	def run_operation(file, path)
 		FileUtils.mv_in_bar(self, file, path)
 	end
diff --git a/code/color.rb b/code/color.rb
index 3968207d..74dc3e73 100644
--- a/code/color.rb
+++ b/code/color.rb
@@ -2,7 +2,7 @@ require 'ncurses'
 require 'code/debug'
 
 module Color
-	extend Color
+	extend self
 
 	COLORSCHEMEDIR = File.join(MYDIR, 'data', 'colorscheme')
 	def load_colorscheme(name)