diff options
| author | Jeff Carr <[email protected]> | 2024-01-06 15:07:30 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-06 15:07:30 -0600 |
| commit | 34bbd63bfbe39fa17dfa5b00628c966a1776b6cb (patch) | |
| tree | 96ef417cc7c9e9fbdd407ea8ba955b9a518db5af | |
| parent | 5dee2af78434191a27987acfb02902a11f81067c (diff) | |
more cleanups after removing old window
Signed-off-by: Jeff Carr <[email protected]>
| -rw-r--r-- | gui.go | 51 | ||||
| -rw-r--r-- | linuxstatus/timer.go | 5 | ||||
| -rw-r--r-- | main.go | 2 | ||||
| -rw-r--r-- | structs.go | 1 |
4 files changed, 6 insertions, 53 deletions
@@ -22,57 +22,9 @@ func setupControlPanelWindow() { // setup the main tab mainWindow("DNS and IPv6 Control Panel") - detailsTab("OS Details") debugTab("Debug") } -func detailsTab(title string) { - var g2 *gui.Node - - me.details = gadgets.NewBasicWindow(me.myGui, title) - me.details.Draw() - me.details.Hide() - - g2 = me.details.Box().NewGroup("Real Stuff") - - grid := g2.NewGrid("gridnuts", 2, 2) - - grid.SetNext(1,1) - - grid.NewLabel("domainname =") - grid.NewLabel("DEPRECATED") -// me.domainname = grid.NewLabel("domainname") - - grid.NewLabel("hostname -s =") - grid.NewLabel("DEPRECATED") - - grid.NewLabel("NS records =") - grid.NewLabel("DEPRECATED") - - grid.NewLabel("UID =") - grid.NewLabel("DEPRECATED") - - grid.NewLabel("Current IPv4 =") - grid.NewLabel("DEPRECATED") - - grid.NewLabel("Current IPv6 =") - grid.NewLabel("DEPRECATED") - - grid.NewLabel("Working Real IPv6 =") - grid.NewLabel("?") - - grid.NewLabel("interfaces =") - me.Interfaces = grid.NewCombobox("Interfaces") - - grid.NewLabel("refresh speed") - me.LocalSpeedActual = grid.NewLabel("unknown") - - grid.Margin() - grid.Pad() - - me.details.Hide() -} - func debugTab(title string) { var g2 *gui.Node @@ -218,9 +170,6 @@ func mainWindow(title string) { me.status.window.Toggle() }) - gr.NewButton("OS details", func () { - me.details.Toggle() - }) gr.NewButton("linuxstatus.New()", func () { if (me.statusOS == nil) { me.statusOS = linuxstatus.New() diff --git a/linuxstatus/timer.go b/linuxstatus/timer.go index cd82f49..17130f3 100644 --- a/linuxstatus/timer.go +++ b/linuxstatus/timer.go @@ -29,3 +29,8 @@ func sortLines(input string) string { tmp = strings.TrimRight(tmp, "\n") return tmp } + +func (ls *LinuxStatus) SetSpeedActual(s string) { + if ! ls.Ready() {return} + ls.speedActual.Set(s) +} @@ -100,7 +100,7 @@ func checkNetworkChanges() { if (runtime.GOOS == "linux") { duration := timeFunction(linuxLoop) s := fmt.Sprint(duration) - me.LocalSpeedActual.SetText(s) + me.statusOS.SetSpeedActual(s) } else { // TODO: make windows and macos diagnostics log.Warn("Windows and MacOS don't work yet") @@ -44,7 +44,6 @@ type Host struct { ipv6s map[string]dns.RR window *gadgets.BasicWindow // the main window - details *gadgets.BasicWindow // more details of the DNS state debug *gadgets.BasicWindow // more attempts to debug the DNS state tab *gui.Node // the main dns tab |
