more code cleanup

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-06-02 12:14:20 -07:00
parent f12d4b5c32
commit 898b9e27c4
2 changed files with 4 additions and 20 deletions

8
box.go
View File

@ -167,8 +167,8 @@ func CreateGenericBox(gw *GuiWindow, b *GuiButton, name string) *GuiBox{
hbox.SetPadded(true)
vbox.Append(hbox, false)
AddBoxToTab(name, gw.UiTab, vbox)
gw.UiTab.Append(name, vbox)
gw.UiTab.SetMargined(0, true)
return box
}
@ -196,7 +196,7 @@ func CreateBox(gw *GuiWindow, name string) *GuiBox {
box.UiBox = hboxAccount
AddBoxToTab(name, gw.UiTab, vbox)
gw.UiTab.Append(name, vbox)
gw.UiTab.SetMargined(0, true)
return box
}

16
misc.go
View File

@ -69,12 +69,6 @@ func StartNewWindow(c *pb.Config, bg bool, action string, maketab func(*GuiWindo
}
}
func getSplashText(a string) *ui.AttributedString {
var aText *ui.AttributedString
aText = ui.NewAttributedString(a)
return aText
}
func InitTabWindow(gw *GuiWindow) {
log.Println("InitTabWindow() THIS WINDOW IS NOT YET SHOWN")
@ -100,19 +94,9 @@ func InitTabWindow(gw *GuiWindow) {
log.Println("InitTabWindow() gw =", gw)
gw.MakeWindow(gw)
// abox := gw.MakeWindow(gw)
// gw.UiTab.Append("WIT Splash", abox.UiBox)
// gw.UiTab.SetMargined(0, true)
gw.UiWindow.Show()
}
func AddBoxToTab(name string, tab *ui.Tab, box *ui.Box) {
tab.Append(name, box)
tab.SetMargined(0, true)
}
/*
// string handling examples that might be helpful for normalizeInt()
isAlpha := regexp.MustCompile(`^[A-Za-z]+$`).MatchString