diff options
author | hut <hut@lavabit.com> | 2009-06-29 01:45:48 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-06-29 01:45:48 +0200 |
commit | 75c3d3dc6fc97501a1c13643682fd732b316a559 (patch) | |
tree | cadb07dea5e839cc7f056ad713c25245d4914993 /code | |
parent | 2f41a544771c0fcaf8abfee963063ba212204d17 (diff) | |
download | ranger-75c3d3dc6fc97501a1c13643682fd732b316a559.tar.gz |
bars fixed
1. colors wouldn't display correctly, because used color_at instead of attr_at. 2. x did not terminate the bar process because of a call to a nonexistant method. 3. added proper colorscheme support
Diffstat (limited to 'code')
-rw-r--r-- | code/bars.rb | 2 | ||||
-rw-r--r-- | code/color.rb | 3 | ||||
-rw-r--r-- | code/draw.rb | 9 | ||||
-rw-r--r-- | code/fm.rb | 1 |
4 files changed, 10 insertions, 5 deletions
diff --git a/code/bars.rb b/code/bars.rb index 8e176c01..08546a79 100644 --- a/code/bars.rb +++ b/code/bars.rb @@ -3,7 +3,7 @@ require 'thread' class Bar def kill(evil = true) Fm.bar_del(self) - Fm.force_update +# Fm.force_update @thread.kill end diff --git a/code/color.rb b/code/color.rb index 74dc3e73..6be8e44f 100644 --- a/code/color.rb +++ b/code/color.rb @@ -91,6 +91,9 @@ module Color use %w{currentdir top} use %w{currentfile top} + use %w{bar_done allowed} + use %w{bar_undone denied} + use %w{butt} use %w{permissions butt} use %w{allowed permissions butt} diff --git a/code/draw.rb b/code/draw.rb index 5a6380e7..693b941b 100644 --- a/code/draw.rb +++ b/code/draw.rb @@ -298,18 +298,19 @@ module Fm end def self.draw_bars() - @bars.each_with_index do |bar, ix| + l = CLI.lines + @bars.each do |bar| bar.update - l = -ix - 1 + l -= 1 puti l, bar.text[0..cols-1].ljust(cols) done = bar.done c = (done * cols).to_i unless done == 0 -# color_at l, 0, c, 0, 4 + attr_at(l, 0, c, *Color.bar_done) end unless done == cols -# color_at l, c, -1, 0, 6 + attr_at(l, c, -1, *Color.bar_undone) end end end diff --git a/code/fm.rb b/code/fm.rb index 1b3e8b69..54608f09 100644 --- a/code/fm.rb +++ b/code/fm.rb @@ -274,6 +274,7 @@ module Fm if @bars.empty? @bars_thread.kill @bars_thread = nil + draw end end |