summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-31 13:34:02 -0600
committerJeff Carr <[email protected]>2024-01-31 13:34:02 -0600
commit7e358767eaef6d0eff3a97fe241708f38ddf9113 (patch)
tree2a77b0fc5679b38078c7a5b4049fcafc16c31e3d
parent9aeed44eea8e85c994d27448d0b7e11bd129a4c4 (diff)
new gui api changes
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--digStatus.go4
-rw-r--r--dns.go2
-rw-r--r--errorBox.go2
-rw-r--r--gui.go1
-rw-r--r--hostnameStatus.go2
-rw-r--r--main.go33
-rw-r--r--resolverBox.go2
-rw-r--r--structs.go2
8 files changed, 24 insertions, 24 deletions
diff --git a/digStatus.go b/digStatus.go
index 8f9d324..15912ea 100644
--- a/digStatus.go
+++ b/digStatus.go
@@ -19,10 +19,10 @@ import (
"reflect"
"time"
- "go.wit.com/lib/gadgets"
"go.wit.com/gui"
- "go.wit.com/log"
+ "go.wit.com/lib/gadgets"
"go.wit.com/lib/gui/shell"
+ "go.wit.com/log"
)
type digStatus struct {
diff --git a/dns.go b/dns.go
index ac625f6..9382f33 100644
--- a/dns.go
+++ b/dns.go
@@ -8,8 +8,8 @@ import (
"net"
"strings"
- "go.wit.com/log"
"go.wit.com/lib/gui/shell"
+ "go.wit.com/log"
)
/*
diff --git a/errorBox.go b/errorBox.go
index 70db592..5796acc 100644
--- a/errorBox.go
+++ b/errorBox.go
@@ -7,8 +7,8 @@ package main
import (
"time"
- "go.wit.com/lib/gadgets"
"go.wit.com/gui"
+ "go.wit.com/lib/gadgets"
"go.wit.com/log"
)
diff --git a/gui.go b/gui.go
index 908822d..d3833d9 100644
--- a/gui.go
+++ b/gui.go
@@ -22,6 +22,7 @@ func setupControlPanelWindow() {
// setup the main tab
mainWindow("DNS and IPv6 Control Panel")
debugTab("Debug")
+ me.window.Show()
}
func debugTab(title string) {
diff --git a/hostnameStatus.go b/hostnameStatus.go
index 947d6db..04f75d4 100644
--- a/hostnameStatus.go
+++ b/hostnameStatus.go
@@ -14,8 +14,8 @@ import (
"strings"
"time"
- "go.wit.com/lib/gadgets"
"go.wit.com/gui"
+ "go.wit.com/lib/gadgets"
"go.wit.com/log"
)
diff --git a/main.go b/main.go
index 86fccf7..4a5fc8b 100644
--- a/main.go
+++ b/main.go
@@ -10,8 +10,8 @@ import (
"embed"
"time"
- "go.wit.com/lib/debugger"
"go.wit.com/gui"
+ "go.wit.com/lib/debugger"
"go.wit.com/log"
"go.wit.com/lib/gui/linuxstatus"
@@ -45,18 +45,21 @@ func main() {
me.myGui.InitEmbed(resToolkit)
me.myGui.Default()
- log.Sleep(me.artificialSleep)
- setupControlPanelWindow()
+ // log.Sleep(me.artificialSleep)
+ // setupControlPanelWindow()
+ // setup the main tab
+ mainWindow("DNS and IPv6 Control Panel")
+ debugTab("Debug")
+ me.window.Show()
+ log.Sleep(1)
+ me.window.Toggle()
+ log.Sleep(1)
+ me.window.Toggle()
me.digStatus = NewDigStatusWindow(me.myGui)
me.statusDNS = NewHostnameStatusWindow(me.myGui)
- me.statusOS = linuxstatus.New()
- me.statusOS.SetParent(me.myGui)
- me.statusOS.InitWindow()
- me.statusOS.Make()
- me.statusOS.Draw()
- me.statusOS.Draw2()
+ me.statusOS = linuxstatus.NewLinuxStatus(me.myGui)
if debugger.ArgDebug() {
go func() {
@@ -64,10 +67,6 @@ func main() {
debugger.DebugWindow()
}()
}
- me.window.Toggle()
- log.Sleep(1)
- me.window.Toggle()
- log.Sleep(1)
log.Sleep(me.artificialSleep)
@@ -80,12 +79,12 @@ func main() {
if me.digStatus.IPv6() {
if current != "WORKING" {
log.Log(CHANGE, "IPv6 resolution is WORKING")
- me.statusIPv6.SetLabel("WORKING")
+ me.statusIPv6.SetText("WORKING")
}
} else {
if current != "Need VPN" {
log.Log(CHANGE, "IPv6 resolution seems to have broken")
- me.statusIPv6.SetLabel("Need VPN")
+ me.statusIPv6.SetText("Need VPN")
}
}
}
@@ -107,7 +106,7 @@ func main() {
me.apiButton.SetText(provider + " wit.com")
}
if provider == "cloudflare" {
- me.DnsAPIstatus.SetLabel("WORKING")
+ me.DnsAPIstatus.SetText("WORKING")
}
})
@@ -118,7 +117,7 @@ func main() {
if me.statusOS.ValidHostname() {
if me.hostnameStatus.String() != "WORKING" {
- me.hostnameStatus.SetLabel("WORKING")
+ me.hostnameStatus.SetText("WORKING")
me.changed = true
}
}
diff --git a/resolverBox.go b/resolverBox.go
index 80480d3..8959a95 100644
--- a/resolverBox.go
+++ b/resolverBox.go
@@ -10,8 +10,8 @@ import (
"strconv"
"time"
- "go.wit.com/lib/gadgets"
"go.wit.com/gui"
+ "go.wit.com/lib/gadgets"
"go.wit.com/log"
"github.com/miekg/dns"
diff --git a/structs.go b/structs.go
index d34e910..f3fad50 100644
--- a/structs.go
+++ b/structs.go
@@ -5,8 +5,8 @@ import (
"net"
"time"
- "go.wit.com/lib/gadgets"
"go.wit.com/gui"
+ "go.wit.com/lib/gadgets"
"go.wit.com/lib/gui/linuxstatus"