(app *adw.Application, title string, text string)
| 27 | } |
| 28 | |
| 29 | func sendNotification(app *adw.Application, title string, text string) { |
| 30 | id, _ := uuid.NewV7() |
| 31 | actionName := "app." + id.String() |
| 32 | app.AddAction(gio.NewSimpleAction(actionName, nil)) |
| 33 | |
| 34 | n := gio.NewNotification(title) |
| 35 | n.SetBody(text) |
| 36 | n.SetPriority(gio.NotificationPriorityUrgent) |
| 37 | n.SetDefaultAction(actionName) |
| 38 | n.SetIcon(gio.NewBytesIcon(glib.NewBytes(icon))) |
| 39 | |
| 40 | app.SendNotification(id.String(), n) |
| 41 | } |