diff --git a/fix.go b/fix.go index 954e0f1..2fe22ec 100644 --- a/fix.go +++ b/fix.go @@ -35,11 +35,11 @@ func fix() bool { log.Log(CHANGE, "OK You do not have real IPv4 addresses. Nothing to fix here") } if ! me.statusDNS.IPv6() { - log.Log(CHANGE, "IPv6 DNS is broken. Check what is broken here") if fixIPv6dns() { log.Log(CHANGE, "IPv6 DNS Repair is underway") return false } + log.Log(CHANGE, "GOOD IPv6 DNS is working!") } log.Log(CHANGE, "GOOD YOU SHOULD BE IN IPv6 BLISS") return true diff --git a/gui.go b/gui.go index 1a4dab9..78539c4 100644 --- a/gui.go +++ b/gui.go @@ -151,8 +151,18 @@ func mainWindow(title string) { me.DnsA = grid.NewLabel("?") // This is where you figure out what to do next to fix the problems - gr.NewButton("fix", func () { - fix() + me.fixButton = gr.NewButton("fix", func () { + if ! fix() { + log.Log(CHANGE, "boo. IPv6 isn't working yet") + return + } + log.Log(CHANGE, "IPv6 WORKED") + // update everything here visually for the user + hostname := me.statusOS.GetHostname() + me.hostname.Set(hostname) + me.hostnameStatus.Set("WORKING") + me.DnsStatus.Set("WORKING") + me.fixButton.Disable() }) grid.Margin() diff --git a/structs.go b/structs.go index 855c832..e060cb7 100644 --- a/structs.go +++ b/structs.go @@ -59,6 +59,7 @@ type Host struct { statusIPv6 *gadgets.OneLiner digStatusButton *gui.Node witcom *gadgets.BasicWindow + fixButton *gui.Node } type IPtype struct {