uh-layout 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/uh/layout/dumper.rb +3 -1
- data/lib/uh/layout/registrant.rb +3 -3
- data/lib/uh/layout/screen.rb +3 -3
- data/lib/uh/layout/version.rb +1 -1
- data/lib/uh/layout.rb +7 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 107a40b97e69793129c9dda9f1a545bb65575884
|
4
|
+
data.tar.gz: e00a2106bed9315fd3f01de4e3155ae6dcea46ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34e2bfb33ebc482e4a7227079fdf6917066dfc3525b8da64881f6b0ba48ff41f1e1518c13d64b4187138c99f433d273fa4ddd89fcb6d36258db4ad0b09ef60df
|
7
|
+
data.tar.gz: e1144c56b9e033375237a30db33f848a99e6df8dddaa93b8465d2151d4624f391b7427b802fccc09e06c4a87d2fa5eab6c1c54996dad2b312defe9dc094ca794
|
data/lib/uh/layout/dumper.rb
CHANGED
@@ -11,7 +11,9 @@ module Uh
|
|
11
11
|
screen.views.each do |view|
|
12
12
|
m << " %s%s\n" % [screen.current_view?(view) ? '*' : ' ', view]
|
13
13
|
view.columns.each do |column|
|
14
|
-
m << " %s%s\n" % [
|
14
|
+
m << " %s%s\n" % [
|
15
|
+
view.current_column?(column) ? '*' : ' ', column
|
16
|
+
]
|
15
17
|
column.clients.each do |client|
|
16
18
|
m << " %s%s\n" % [
|
17
19
|
column.current_client?(client) ? '*' : ' ',
|
data/lib/uh/layout/registrant.rb
CHANGED
@@ -5,9 +5,9 @@ module Uh
|
|
5
5
|
def register(layout, display)
|
6
6
|
display.screens.each do |screen|
|
7
7
|
layout.screens << scr = Screen.new(screen.id, screen.geo)
|
8
|
-
|
9
|
-
|
10
|
-
bar.active = layout.current_screen? scr
|
8
|
+
bar = Bar.new(display, scr, layout.colors).tap do |b|
|
9
|
+
layout.widgets << b.show.focus
|
10
|
+
b.on_update { bar.active = layout.current_screen? scr }
|
11
11
|
end
|
12
12
|
scr.height = scr.height - bar.height
|
13
13
|
end
|
data/lib/uh/layout/screen.rb
CHANGED
@@ -10,9 +10,9 @@ module Uh
|
|
10
10
|
attr_reader :id, :views, :geo
|
11
11
|
|
12
12
|
def initialize(id, geo)
|
13
|
-
@id
|
14
|
-
@geo
|
15
|
-
@views
|
13
|
+
@id = id
|
14
|
+
@geo = geo.dup
|
15
|
+
@views = Container.new([View.new('1', @geo)])
|
16
16
|
end
|
17
17
|
|
18
18
|
def to_s
|
data/lib/uh/layout/version.rb
CHANGED
data/lib/uh/layout.rb
CHANGED
@@ -189,13 +189,18 @@ module Uh
|
|
189
189
|
end
|
190
190
|
|
191
191
|
def find_view_or_create(view_id)
|
192
|
-
current_screen.views.find
|
192
|
+
current_screen.views.find do
|
193
|
+
|e| e.id == view_id
|
194
|
+
end or View.new(view_id, current_screen.geo).tap do |view|
|
193
195
|
current_screen.views << view
|
194
196
|
end
|
195
197
|
end
|
196
198
|
|
197
199
|
def client_mover_for_current_view
|
198
|
-
ClientColumnMover.new(
|
200
|
+
ClientColumnMover.new(
|
201
|
+
current_view.columns,
|
202
|
+
current_view.columns_max_count?
|
203
|
+
)
|
199
204
|
end
|
200
205
|
end
|
201
206
|
end
|