diff options
| -rw-r--r-- | argv.go (renamed from debugger.go) | 1 | ||||
| -rw-r--r-- | controlPanelWindow.go | 6 | ||||
| -rw-r--r-- | digStatusWindow.go | 2 | ||||
| -rw-r--r-- | errorBox.go | 2 | ||||
| -rw-r--r-- | hostnameStatusWindow.go | 2 | ||||
| -rw-r--r-- | main.go | 10 |
6 files changed, 14 insertions, 9 deletions
@@ -11,6 +11,7 @@ import ( ) var args struct { + Daemon bool `arg:"--daemon" help:"run without a gui"` } func init() { diff --git a/controlPanelWindow.go b/controlPanelWindow.go index 827e6c3..c9e1917 100644 --- a/controlPanelWindow.go +++ b/controlPanelWindow.go @@ -46,13 +46,14 @@ func makeMainWindow() { func statusGrid(n *gui.Node) { problems := n.NewGroup("status") - grid := problems.NewGrid("nuts", 3, 1) + grid := problems.RawGrid() grid.NewLabel("hostname =") me.hostnameStatus = grid.NewLabel("invalid") grid.NewButton("Linux Status", func() { me.statusOS.Toggle() }) + grid.NextRow() me.statusIPv6 = gadgets.NewOneLiner(grid, "DNS Lookup") me.statusIPv6.SetText("known") @@ -62,6 +63,7 @@ func statusGrid(n *gui.Node) { } me.digStatus.window.Toggle() }) + grid.NextRow() grid.NewLabel("DNS Status") me.DnsStatus = grid.NewLabel("unknown") @@ -71,6 +73,7 @@ func statusGrid(n *gui.Node) { } me.statusDNS.window.Toggle() }) + grid.NextRow() grid.NewLabel("DNS API") me.DnsAPIstatus = grid.NewLabel("unknown") @@ -85,6 +88,7 @@ func statusGrid(n *gui.Node) { } } }) + grid.NextRow() } func myDefaultExit(n *gui.Node) { diff --git a/digStatusWindow.go b/digStatusWindow.go index a0917f5..e62be77 100644 --- a/digStatusWindow.go +++ b/digStatusWindow.go @@ -55,7 +55,7 @@ type digStatus struct { statusHTTP *gadgets.OneLiner } -func NewDigStatusWindow() *digStatus { +func InitDigStatus() *digStatus { var ds *digStatus ds = new(digStatus) diff --git a/errorBox.go b/errorBox.go index 0a16631..b2605e5 100644 --- a/errorBox.go +++ b/errorBox.go @@ -43,7 +43,7 @@ type anError struct { problem *Problem } -func NewErrorBox(p *gui.Node, name string, ip string) *errorBox { +func InitErrorBox(p *gui.Node, name string, ip string) *errorBox { var eb *errorBox eb = new(errorBox) eb.parent = p diff --git a/hostnameStatusWindow.go b/hostnameStatusWindow.go index 6a88fae..5ce8ae9 100644 --- a/hostnameStatusWindow.go +++ b/hostnameStatusWindow.go @@ -56,7 +56,7 @@ type hostnameStatus struct { // dnsAction *gui.Node } -func NewHostnameStatusWindow() *hostnameStatus { +func InitHostnameStatus() *hostnameStatus { var hs *hostnameStatus hs = new(hostnameStatus) @@ -46,17 +46,17 @@ func main() { makeMainWindow() // These are your problems - me.problems = NewErrorBox(me.window.Box(), "Errors", "has problems?") + me.problems = InitErrorBox(me.window.Box(), "Errors", "has problems?") me.problems.addIPerror(RR, USER, "1:1:1:1") me.window.Show() me.debug = debugWindow("Debugging") - me.digStatus = NewDigStatusWindow() - me.statusDNS = NewHostnameStatusWindow() - - me.statusOS = linuxstatus.NewLinuxStatus(me.myGui) + // 3 external windows that should be seperate go packages + me.digStatus = InitDigStatus() + me.statusDNS = InitHostnameStatus() + me.statusOS = linuxstatus.InitLinuxStatus() digLoop() |
