summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-05-10 01:26:55 -0700
committerJeff Carr <[email protected]>2019-05-10 01:26:55 -0700
commitdbe88483da913513c76cc88a59215823965bc3e9 (patch)
tree2cf98e96d485f19c62e8633c4084c0c6e6463db9
parent7d6a2aba712a85f33c26567bd2c9272560374883 (diff)
more stable than before
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--gui.go14
1 files changed, 6 insertions, 8 deletions
diff --git a/gui.go b/gui.go
index d494c45..8d5b462 100644
--- a/gui.go
+++ b/gui.go
@@ -248,10 +248,9 @@ func AddChoosersDemo() {
tabcount += 1
}
-func AddNewTab(newbox ui.Control) {
- maintab.Append("Cloud Info", newbox)
- maintab.SetMargined(tabcount, true)
- tabcount += 1
+func AddNewTab(mytab *ui.Tab, newbox ui.Control, tabOffset int) {
+ mytab.Append("Cloud Info", newbox)
+ mytab.SetMargined(tabOffset, true)
}
// This hangs on GTK
@@ -305,7 +304,7 @@ type InputData struct {
Color string
}
-func AddTableTab(name string, rowcount int, parts []InputData) {
+func AddTableTab(mytab *ui.Tab, mytabcount int, name string, rowcount int, parts []InputData) {
mh := new(tableData)
mh.rowcount = rowcount
@@ -354,9 +353,8 @@ func AddTableTab(name string, rowcount int, parts []InputData) {
}
}
- maintab.Append(name, table)
- maintab.SetMargined(tabcount, true)
- tabcount += 1
+ mytab.Append(name, table)
+ mytab.SetMargined(mytabcount, true)
}
func DoGUI() {