about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-06-29 01:45:48 +0200
committerhut <hut@lavabit.com>2009-06-29 01:45:48 +0200
commit75c3d3dc6fc97501a1c13643682fd732b316a559 (patch)
treecadb07dea5e839cc7f056ad713c25245d4914993
parent2f41a544771c0fcaf8abfee963063ba212204d17 (diff)
downloadranger-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
-rw-r--r--TODO1
-rw-r--r--code/bars.rb2
-rw-r--r--code/color.rb3
-rw-r--r--code/draw.rb9
-rw-r--r--code/fm.rb1
-rw-r--r--data/colorscheme/default.rb3
6 files changed, 13 insertions, 6 deletions
diff --git a/TODO b/TODO
index 8f32d53f..15d61db6 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,3 @@
-fix bars!!
 a key that moves through the files in a certian order, like creation-time, newest first.
 if the directory content changes, eg files are deleted, delete those files from selection as well.
 device is busy even if youre not on the device :<?
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
 
diff --git a/data/colorscheme/default.rb b/data/colorscheme/default.rb
index 91e5ff57..ae1eb1f7 100644
--- a/data/colorscheme/default.rb
+++ b/data/colorscheme/default.rb
@@ -18,6 +18,9 @@ module Color
 	@denied = pink, default, none
 	@date = default, default, bold
 
+	@bar_done = black, cyan, none
+	@bar_undone = default, default, none
+
 	module Selected
 		@base = blue, default, reverse
 		@link = cyan, default, reverse
:51 +0100 committer Drew DeVault <sir@cmpwn.com> 2019-07-26 14:00:24 -0400 Add new-email trigger' href='/akspecs/aerc/commit/commands/commands.go?h=0.5.0&id=dc4c36adbfbffd34319ddc007bad437ef802ee72'>dc4c36a ^
d394fd1 ^


2a09617 ^

b60999c ^
8126d82 ^
b60999c ^
2a09617 ^







cded067 ^


2a09617 ^

cded067 ^
2a09617 ^
cded067 ^





2a09617 ^

























f9d26ee ^
f9d26ee ^

cded067 ^


f9d26ee ^
63f934e ^
f9d26ee ^




63f934e ^

















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146