summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-03-02 13:34:09 -0600
committerJeff Carr <[email protected]>2025-03-02 13:34:09 -0600
commit063818335663e7aa626434d5dc035f8b5455e5ae (patch)
tree85a8543f77124fb919352a564775b3f77b567be0 /init.go
parentf24c5098597922913f68d22960033318fb56ad1d (diff)
start moving to standard internal TK functions
Diffstat (limited to 'init.go')
-rw-r--r--init.go23
1 files changed, 12 insertions, 11 deletions
diff --git a/init.go b/init.go
index 5fcf589..ef29827 100644
--- a/init.go
+++ b/init.go
@@ -68,7 +68,8 @@ func initPlugin() {
me.dropdown.wId = -77
me.textbox.wId = -55
me.stdout.wId = -4
- me.clock.wId = -5
+ me.notify.clock.wId = -5
+ me.notify.menu.wId = -5
Set(&me.dropdown, "default")
// s := fmt.Sprintln("fake default check =", me.FakeW, "dropdown.Id", me.dropdown.Id)
@@ -252,24 +253,24 @@ func refreshGocui() {
// todo: add logic here to see if the application has changed anything
// me.baseGui.UpdateAsync(testRefresh) // probably don't need this
me.baseGui.Update(testRefresh)
- if me.clock.tk != nil && !me.showHelp {
+ if me.notify.clock.tk != nil && !me.showHelp {
// also double check the gocui view exists
- if me.clock.tk.v != nil {
- me.clock.tk.v.Clear()
- me.clock.tk.labelN = time.Now().Format("15:04:05")
- me.clock.tk.v.WriteString(me.clock.tk.labelN)
+ if me.notify.clock.tk.v != nil {
+ me.notify.clock.tk.v.Clear()
+ me.notify.clock.tk.labelN = time.Now().Format("15:04:05")
+ me.notify.clock.tk.v.WriteString(me.notify.clock.tk.labelN)
}
}
lastRefresh = time.Now()
} else {
me.baseGui.Update(testRefresh)
if time.Since(lastRefresh) > 3*time.Second {
- if me.clock.tk != nil && !me.showHelp {
+ if me.notify.clock.tk != nil && !me.showHelp {
// also double check the gocui view exists
- if me.clock.tk.v != nil {
- me.clock.tk.v.Clear()
- me.clock.tk.labelN = time.Now().Format("15:04:05")
- me.clock.tk.v.WriteString(me.clock.tk.labelN)
+ if me.notify.clock.tk.v != nil {
+ me.notify.clock.tk.v.Clear()
+ me.notify.clock.tk.labelN = time.Now().Format("15:04:05")
+ me.notify.clock.tk.v.WriteString(me.notify.clock.tk.labelN)
}
}
lastRefresh = time.Now()