summaryrefslogtreecommitdiffstats
path: root/layout
diff options
context:
space:
mode:
authorSean E. Russell <ser@ser1.net>2020-02-27 18:51:28 -0600
committerSean E. Russell <ser@ser1.net>2020-02-28 07:06:51 -0600
commit7a89225d729d4c54c5bc95b21979f48f9cd046b1 (patch)
tree10bf143324cf553765d7002d0eb82abc21c72bb1 /layout
parent4fce1654c5c263797205997e7635c7d06c393a85 (diff)
Abstracts CPU & mem devices.
Finishes device refactoring: temps Refactoring to allow updating maps. Simpler, and optimizable.
Diffstat (limited to 'layout')
-rw-r--r--layout/layout.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/layout/layout.go b/layout/layout.go
index 94a9461..12bc5d2 100644
--- a/layout/layout.go
+++ b/layout/layout.go
@@ -46,7 +46,6 @@ func Layout(wl layout, c gotop.Config) (*MyGrid, error) {
rgs := make([]interface{}, 0)
for i, ur := range uiRows {
rh := float64(heights[i]) / float64(maxHeight)
- log.Printf("appending row %d with height %d", i, heights[i])
rgs = append(rgs, ui.NewRow(rh, ur...))
}
grid := &MyGrid{ui.NewGrid(), nil, nil}
@@ -65,8 +64,6 @@ func Layout(wl layout, c gotop.Config) (*MyGrid, error) {
// rows as the largest row span object in the row, and produce an uber-row
// containing all that stuff. It returns a slice without the consumed elements.
func processRow(c gotop.Config, numRows int, rowDefs [][]widgetRule) (int, []interface{}, [][]widgetRule) {
- log.Printf("got %d rows", len(rowDefs))
-
// Recursive function #3. See the comment in deepFindProc.
if len(rowDefs) < 1 {
return 0, nil, [][]widgetRule{}
@@ -75,7 +72,6 @@ func processRow(c gotop.Config, numRows int, rowDefs [][]widgetRule) (int, []int
// will be consumed, and the overall height of the row that will be
// produced.
maxHeight := countMaxHeight([][]widgetRule{rowDefs[0]})
- log.Printf("maxHeight %d", maxHeight)
var processing [][]widgetRule
if maxHeight < len(rowDefs) {
processing = rowDefs[0:maxHeight]
@@ -84,7 +80,6 @@ func processRow(c gotop.Config, numRows int, rowDefs [][]widgetRule) (int, []int
processing = rowDefs[0:]
rowDefs = [][]widgetRule{}
}
- log.Printf("consuming %d rows, %d remainder rows", len(processing), len(rowDefs))
var colWeights []float64
var columns [][]interface{}
numCols := len(processing[0])
@@ -110,7 +105,6 @@ outer:
}
if full {
rowDefs = append(processing[i:], rowDefs...)
- log.Printf("prepended early consumption; remainder now %d rows", len(rowDefs))
break
}
// Not all rows have been consumed, so go ahead and place the row's
@@ -141,7 +135,6 @@ outer:
}
}
- log.Printf("returning %d columns", len(uiColumns))
return maxHeight, uiColumns, rowDefs
}