new gui api changes
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
9aeed44eea
commit
7e358767ea
|
@ -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 {
|
||||
|
|
2
dns.go
2
dns.go
|
@ -8,8 +8,8 @@ import (
|
|||
"net"
|
||||
"strings"
|
||||
|
||||
"go.wit.com/log"
|
||||
"go.wit.com/lib/gui/shell"
|
||||
"go.wit.com/log"
|
||||
)
|
||||
|
||||
/*
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
1
gui.go
1
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) {
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
33
main.go
33
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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in New Issue