diff options
| author | Jeff Carr <[email protected]> | 2024-02-21 10:34:13 -0600 | 
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-21 10:34:13 -0600 | 
| commit | fd082d49659c722776d72b97b9eca9d4aab8b78e (patch) | |
| tree | 579d5a12a402fd39097f9b60edbd9ed1d2592c62 | |
| parent | 67d9306298b65623234d5b35c5e8f0b554623925 (diff) | |
Signed-off-by: Jeff Carr <[email protected]>
| -rw-r--r-- | controlPanelWindow.go | 25 | ||||
| -rw-r--r-- | digStatusWindow.go | 4 | ||||
| -rw-r--r-- | hostnameStatusWindow.go | 4 | ||||
| -rw-r--r-- | main.go | 32 | 
4 files changed, 23 insertions, 42 deletions
diff --git a/controlPanelWindow.go b/controlPanelWindow.go index 3392321..827e6c3 100644 --- a/controlPanelWindow.go +++ b/controlPanelWindow.go @@ -12,26 +12,6 @@ import (  // This setups up the dns control panel window  func setupControlPanelWindow(title string) { -	log.Info("artificial sleep of:", me.artificialSleep) -	log.Sleep(me.artificialSleep) - -	// setup the main tab -	me.window = gadgets.NewBasicWindow(me.myGui, title) -	me.window.Vertical() -	me.window.Make() - -	makeMainWindow() - -	// These are your problems -	me.problems = NewErrorBox(me.window.Box(), "Errors", "has problems?") -	me.problems.addIPerror(RR, USER, "1:1:1:1") - -	me.window.Draw() -} - -func myDefaultExit(n *gui.Node) { -	log.Println("You can Do exit() things here") -	os.Exit(0)  }  func makeMainWindow() { @@ -106,3 +86,8 @@ func statusGrid(n *gui.Node) {  		}  	})  } + +func myDefaultExit(n *gui.Node) { +	log.Println("You can Do exit() things here") +	os.Exit(0) +} diff --git a/digStatusWindow.go b/digStatusWindow.go index dce5b71..a0917f5 100644 --- a/digStatusWindow.go +++ b/digStatusWindow.go @@ -55,14 +55,14 @@ type digStatus struct {  	statusHTTP   *gadgets.OneLiner  } -func NewDigStatusWindow(p *gui.Node) *digStatus { +func NewDigStatusWindow() *digStatus {  	var ds *digStatus  	ds = new(digStatus)  	ds.ready = false  	ds.hidden = true -	ds.window = gadgets.NewBasicWindow(p, "DNS Resolver Status") +	ds.window = gadgets.RawBasicWindow("DNS Resolver Status")  	ds.window.Make()  	// ds.window.Draw()  	// ds.window.Hide() diff --git a/hostnameStatusWindow.go b/hostnameStatusWindow.go index 04f75d4..6a88fae 100644 --- a/hostnameStatusWindow.go +++ b/hostnameStatusWindow.go @@ -56,7 +56,7 @@ type hostnameStatus struct {  	//	dnsAction	*gui.Node  } -func NewHostnameStatusWindow(p *gui.Node) *hostnameStatus { +func NewHostnameStatusWindow() *hostnameStatus {  	var hs *hostnameStatus  	hs = new(hostnameStatus) @@ -64,7 +64,7 @@ func NewHostnameStatusWindow(p *gui.Node) *hostnameStatus {  	hs.hidden = true  	// hs.hostname = me.hostname -	hs.window = gadgets.NewBasicWindow(p, "fix hostname here"+" Status") +	hs.window = gadgets.RawBasicWindow("fix hostname here"+" Status")  	hs.window.Make()  	// hs.window.Draw()  	// hs.window.Hide() @@ -11,9 +11,9 @@ import (  	"time"  	"go.wit.com/gui" -	"go.wit.com/lib/debugger"  	"go.wit.com/log" +	"go.wit.com/lib/gadgets"  	"go.wit.com/lib/gui/linuxstatus"  	"github.com/miekg/dns" @@ -39,28 +39,24 @@ func main() {  	me.myGui.InitEmbed(resToolkit)  	me.myGui.Default() -	// setup the main window -	setupControlPanelWindow("DNS and IPv6 Control Panel") +	// setup the main tab +	me.window = gadgets.RawBasicWindow("DNS and IPv6 Control Panel") +	me.window.Make() -	me.debug = debugWindow("Debugging") +	makeMainWindow() -	// TODO: track this bug down -	log.Sleep(1) -	me.window.Toggle() -	log.Sleep(1) -	me.window.Toggle() +	// These are your problems +	me.problems = NewErrorBox(me.window.Box(), "Errors", "has problems?") +	me.problems.addIPerror(RR, USER, "1:1:1:1") -	me.digStatus = NewDigStatusWindow(me.myGui) -	me.statusDNS = NewHostnameStatusWindow(me.myGui) +	me.window.Show() -	me.statusOS = linuxstatus.NewLinuxStatus(me.myGui) +	me.debug = debugWindow("Debugging") -	if debugger.ArgDebug() { -		go func() { -			log.Sleep(2) -			debugger.DebugWindow() -		}() -	} +	me.digStatus = NewDigStatusWindow() +	me.statusDNS = NewHostnameStatusWindow() + +	me.statusOS = linuxstatus.NewLinuxStatus(me.myGui)  	digLoop()  | 
