summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--args.go6
-rw-r--r--gui.go6
-rw-r--r--main.go22
-rw-r--r--structs.go1
4 files changed, 11 insertions, 24 deletions
diff --git a/args.go b/args.go
index 0206c5a..7286e93 100644
--- a/args.go
+++ b/args.go
@@ -3,7 +3,7 @@ package main
import (
"git.wit.org/wit/gui"
- "git.wit.org/jcarr/dnssecsocket"
+ // "git.wit.org/jcarr/dnssecsocket"
)
type LogOptions struct {
@@ -17,10 +17,10 @@ type LogOptions struct {
var args struct {
LogOptions
- dnssecsocket.Args
+ // dnssecsocket.Args
gui.GuiArgs
}
func parsedown () {
- dnssecsocket.Parse(args.VerboseDnssec)
+ // dnssecsocket.Parse(args.VerboseDnssec)
}
diff --git a/gui.go b/gui.go
index 9393d03..7d360f3 100644
--- a/gui.go
+++ b/gui.go
@@ -17,7 +17,7 @@ import (
func setupControlPanelWindow() {
// me.window = myGui.New2().Window("DNS and IPv6 Control Panel").Standard()
me.window = myGui.NewWindow("DNS and IPv6 Control Panel").Standard()
- me.window.Dump(true)
+ me.window.Dump()
sleep(1)
addDNSTab("DNS")
@@ -100,12 +100,14 @@ func addDNSTab(title string) {
nsupdateGroup(me.tab)
+ /*
tmp := me.tab.NewGroup("output")
me.output = tmp.NewTextbox("some output")
me.output.Custom = func() {
s := me.output.GetText()
log("output text =", s)
}
+ */
}
func myDefaultExit(n *gui.Node) {
@@ -149,6 +151,7 @@ func nsupdateGroup(w *gui.Node) {
})
}
+/*
var outJunk string
func output(s string, a bool) {
if (a) {
@@ -159,6 +162,7 @@ func output(s string, a bool) {
me.output.SetText(outJunk)
log(outJunk)
}
+*/
func updateDNS() {
var aaaa []string
diff --git a/main.go b/main.go
index de326c9..d283329 100644
--- a/main.go
+++ b/main.go
@@ -25,36 +25,23 @@ func main() {
me.ifmap = make(map[int]*IFtype)
me.dnsTTL = 5 // recheck DNS is working every 2 minutes // TODO: watch rx packets?
-
- log()
- log(true, "this is true")
- log(false, "this is false")
- sleep(.4)
- sleep(.3)
- sleep(.2)
- sleep("done scanning net")
-
- // Example_listLink()
-
- log("Toolkit = ", args.Toolkit)
- for i, t := range args.Toolkit {
+ log("Toolkit = ", args.GuiToolkit)
+ for i, t := range args.GuiToolkit {
log("trying to load plugin", i, t)
myGui.LoadToolkit(t)
}
// will set all debugging flags
- gui.SetDebug(true)
+ // gui.SetDebug(true)
myGui = gui.New().LoadToolkit("gocui")
sleep(1)
setupControlPanelWindow()
sleep(1)
- // sleep(1)
if (args.GuiDebug) {
gui.DebugWindow()
}
gui.ShowDebugValues()
- go gui.Watchdog()
// forever monitor for network and dns changes
checkNetworkChanges()
@@ -102,10 +89,7 @@ func dnsTTL() {
if (me.changed) {
stamp := time.Now().Format("2006/01/02 15:04:05")
- s := stamp + " Network things changed"
log(logError, "Network things changed on", stamp)
updateDNS()
- me.output.SetText(s)
-
}
}
diff --git a/structs.go b/structs.go
index 0f91a9f..7f5c004 100644
--- a/structs.go
+++ b/structs.go
@@ -22,7 +22,6 @@ type Host struct {
window *gui.Node // the main window
tab *gui.Node // the main dns tab
notes *gui.Node // using this to put notes here
- output *gui.Node // Textbox for dumping output
uid *gui.Node // user
fqdn *gui.Node // display the full hostname
IPv4 *gui.Node // show valid IPv4 addresses