diff options
| author | Jeff Carr <[email protected]> | 2025-03-04 13:35:13 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-03-04 13:35:13 -0600 |
| commit | 96eac58cf59d2c735cd2b88e4458fff12422e121 (patch) | |
| tree | 51952850cd2178eaf9c4ec2676d9d4877424eed8 /libnotify.go | |
| parent | b8781b1b64a3bc378fe8c12bcecfcad49ebb01c2 (diff) | |
name change libnotify 'menu' to 'icon'
Diffstat (limited to 'libnotify.go')
| -rw-r--r-- | libnotify.go | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/libnotify.go b/libnotify.go index 5bfa077..750adee 100644 --- a/libnotify.go +++ b/libnotify.go @@ -67,21 +67,21 @@ func makeNotifyClock() { } -func makeNotifyMenu() { +func makeNotifyIcon() { if me.treeRoot == nil { log.Info("gogui makeClock() error. treeRoot == nil") return } - me.notify.menu.tk = makeNewInternalWidget(me.notify.menu.wId) - me.notify.menu.tk.dumpWidget("init() menu") + me.notify.icon.tk = makeNewInternalWidget(me.notify.icon.wId) + me.notify.icon.tk.dumpWidget("init() menu") w, _ := me.baseGui.Size() - me.notify.menu.tk.MoveToOffset(w-5, me.notify.menu.offsetH) - me.notify.menu.tk.labelN = "[ ]" - me.notify.menu.tk.frame = false - me.notify.menu.tk.setColorNotifyMenu() - me.notify.menu.tk.Show() - me.notify.menu.active = true - me.notify.menu.tk.dumpWidget("notifyMenu()") + me.notify.icon.tk.MoveToOffset(w-5, me.notify.icon.offsetH) + me.notify.icon.tk.labelN = "[ ]" + me.notify.icon.tk.frame = false + me.notify.icon.tk.setColorNotifyIcon() + me.notify.icon.tk.Show() + me.notify.icon.active = true + me.notify.icon.tk.dumpWidget("notifyIcon()") } @@ -111,7 +111,7 @@ func libNotifyUpdate() { me.notify.clock.tk.Show() sigWinchBG() - sigWinchMenu() + sigWinchIcon() } // update the time @@ -122,30 +122,30 @@ func libNotifyUpdate() { // hardDrawUnderMouse(me.notify.clock.tk, "clock") // log.Info("libNotifyUpdate updated clock", me.notify.clock.tk.labelN) - if me.notify.menu.tk == nil { + if me.notify.icon.tk == nil { log.Info("libNotifyUpdate error menu.tk == nil") return } - if me.notify.menu.tk.v == nil { + if me.notify.icon.tk.v == nil { log.Info("libNotifyUpdate error menu.tk.v == nil") return } // update the menu - hardDrawAtgocuiSize(me.notify.menu.tk) - me.notify.menu.tk.setColorNotifyMenu() - me.baseGui.SetViewOnTop(me.notify.menu.tk.v.Name()) + hardDrawAtgocuiSize(me.notify.icon.tk) + me.notify.icon.tk.setColorNotifyIcon() + me.baseGui.SetViewOnTop(me.notify.icon.tk.v.Name()) me.baseGui.SetViewOnTop(me.notify.clock.tk.v.Name()) } -func setNotifyMenuText(s string) { - me.notify.menu.tk.v.Clear() - me.notify.menu.tk.labelN = s - me.notify.menu.tk.v.WriteString(me.notify.menu.tk.labelN) - hardDrawAtgocuiSize(me.notify.menu.tk) - me.notify.menu.tk.setColorNotifyMenu() - me.baseGui.SetViewOnTop(me.notify.menu.tk.v.Name()) - log.Info("setNotifyMenuText() updated menu to:", me.notify.menu.tk.labelN) +func setNotifyIconText(s string) { + me.notify.icon.tk.v.Clear() + me.notify.icon.tk.labelN = s + me.notify.icon.tk.v.WriteString(me.notify.icon.tk.labelN) + hardDrawAtgocuiSize(me.notify.icon.tk) + me.notify.icon.tk.setColorNotifyIcon() + me.baseGui.SetViewOnTop(me.notify.icon.tk.v.Name()) + log.Info("setNotifyIconText() updated menu to:", me.notify.icon.tk.labelN) } // in the very end of redrawing things, this will place the help and stdout on the top or botton @@ -161,9 +161,9 @@ func setThingsOnTop() { me.baseGui.SetViewOnTop(me.notify.clock.tk.v.Name()) } - if me.notify.menu.tk != nil { - if me.notify.menu.tk.v != nil { - me.baseGui.SetViewOnTop(me.notify.menu.tk.v.Name()) + if me.notify.icon.tk != nil { + if me.notify.icon.tk.v != nil { + me.baseGui.SetViewOnTop(me.notify.icon.tk.v.Name()) } } @@ -238,11 +238,11 @@ func hardDrawAtgocuiSize(tk *guiWidget) { log.Verbose("hardDrawAtgocuiSize() err ok widget", tk.cuiName, a, b, c, d, tk.v.Name()) } -func sigWinchMenu() { +func sigWinchIcon() { w, _ := me.baseGui.Size() - me.notify.menu.tk.MoveToOffset(w-me.notify.menu.offsetW, me.notify.menu.offsetH) - me.notify.menu.tk.Hide() - me.notify.menu.tk.Show() + me.notify.icon.tk.MoveToOffset(w-me.notify.icon.offsetW, me.notify.icon.offsetH) + me.notify.icon.tk.Hide() + me.notify.icon.tk.Show() } func sigWinchBG() { |
