diff options
author | hut <hut@lavabit.com> | 2009-06-12 06:43:53 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-06-12 06:43:53 +0200 |
commit | a5661ea937c9d70b4cd845f723a5d67fed4c4d65 (patch) | |
tree | da18e6142c23793b79ee620c7cb2d94128459f60 /code/bars.rb | |
parent | 1cd54faf68a8f07ac55bd8bc97940439169fbfae (diff) | |
download | ranger-a5661ea937c9d70b4cd845f723a5d67fed4c4d65.tar.gz |
comment out unused bars
Diffstat (limited to 'code/bars.rb')
-rw-r--r-- | code/bars.rb | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/code/bars.rb b/code/bars.rb index 61d14572..40f7689e 100644 --- a/code/bars.rb +++ b/code/bars.rb @@ -1,55 +1,55 @@ -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 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 def kill(evil = true) |