status line

This commit is contained in:
piotr
2021-05-24 04:34:11 +02:00
parent 1c9ad42e8b
commit 30287ff669
4 changed files with 20 additions and 4 deletions

View File

@@ -221,7 +221,8 @@ func flowBoxButton(entry desktopEntry) *gtk.Button {
ID := entry.DesktopID
exec := entry.Exec
terminal := entry.Terminal
button.Connect("button-release-event", func(row *gtk.Button, e *gdk.Event) bool {
desc := entry.CommentLoc
button.Connect("button-release-event", func(btn *gtk.Button, e *gdk.Event) bool {
btnEvent := gdk.EventButtonNewFromEvent(e)
if btnEvent.Button() == 1 {
launch(exec, terminal)
@@ -232,6 +233,12 @@ func flowBoxButton(entry desktopEntry) *gtk.Button {
}
return false
})
button.Connect("enter-notify-event", func() {
statusLabel.SetText(desc)
})
button.Connect("leave-notify-event", func() {
statusLabel.SetText(status)
})
return button
}