summaryrefslogtreecommitdiff
path: root/toolkit/andlabs/tab.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-03-29 22:44:08 -0500
committerJeff Carr <[email protected]>2023-03-29 22:44:08 -0500
commit947169df5a22c9f9b53f825764747f648c70ff1e (patch)
tree3c84fffc14352329bc41e6b58910ff278c99f08c /toolkit/andlabs/tab.go
parent6013fde8332e8ecbffaf1a0977ba2e1da8ea8775 (diff)
ready for version v0.7.4
start deprecating toolkit.Widget switch to variable name 'ParentId' use 'ActionType' and 'WidgetType' preliminary redraw() final definition of variables 'Name' and 'Text' more cleaning of the code remove lots of dumb code bind 'd' key press to dump out debugging info early color handling in gocui! Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs/tab.go')
-rw-r--r--toolkit/andlabs/tab.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/toolkit/andlabs/tab.go b/toolkit/andlabs/tab.go
index c28b403..0753338 100644
--- a/toolkit/andlabs/tab.go
+++ b/toolkit/andlabs/tab.go
@@ -23,34 +23,34 @@ func (t *andlabsT) newTab(a *toolkit.Action) {
// var w *ui.Window
var newt *andlabsT
- log(debugToolkit, "newTab() START", a.WidgetId, a.WhereId)
+ log(debugToolkit, "newTab() START", a.WidgetId, a.ParentId)
if (t.uiTab == nil) {
if (t.uiWindow == nil) {
- log(debugToolkit, "newTab() uiWindow == nil. I can't add a toolbar without window", a.WidgetId, a.WhereId)
+ log(debugToolkit, "newTab() uiWindow == nil. I can't add a toolbar without window", a.WidgetId, a.ParentId)
return
}
// this means you have to make a new tab
- log(debugToolkit, "newTab() GOOD. This should be the first tab:", a.WidgetId, a.WhereId)
- newt = rawTab(t.uiWindow, a.Title)
+ log(debugToolkit, "newTab() GOOD. This should be the first tab:", a.WidgetId, a.ParentId)
+ newt = rawTab(t.uiWindow, a.Text)
t.uiTab = newt.uiTab
} else {
// this means you have to append a tab
- log(debugToolkit, "newTab() GOOD. This should be an additional tab:", a.WidgetId, a.WhereId)
- newt = t.appendTab(a.Title)
+ log(debugToolkit, "newTab() GOOD. This should be an additional tab:", a.WidgetId, a.ParentId)
+ newt = t.appendTab(a.Text)
}
// add the structure to the array
if (andlabs[a.WidgetId] == nil) {
- log(logInfo, "newTab() MAPPED", a.WidgetId, a.WhereId)
+ log(logInfo, "newTab() MAPPED", a.WidgetId, a.ParentId)
andlabs[a.WidgetId] = newt
newt.Type = a.Widget.Type
} else {
- log(debugError, "newTab() DO WHAT?", a.WidgetId, a.WhereId)
+ log(debugError, "newTab() DO WHAT?", a.WidgetId, a.ParentId)
log(debugError, "THIS IS BAD")
}
- newt.Name = a.Title
+ newt.Name = a.Name
log(debugToolkit, "t:")
t.Dump(debugToolkit)
@@ -120,11 +120,11 @@ func (t *andlabsT) appendTab(name string) *andlabsT {
func newTab(a *toolkit.Action) {
// w := a.Widget
- log(debugToolkit, "newTab()", a.WhereId)
+ log(debugToolkit, "newTab()", a.ParentId)
- t := andlabs[a.WhereId]
+ t := andlabs[a.ParentId]
if (t == nil) {
- log(debugToolkit, "newTab() parent toolkit == nil. new tab can not be made =", a.WhereId)
+ log(debugToolkit, "newTab() parent toolkit == nil. new tab can not be made =", a.ParentId)
log(debugToolkit, "look for a window? check for an existing tab?")
return
}