feat: set urgency on linux notifications (#20152)
This commit is contained in:
parent
e510af77b2
commit
ffe2182883
7 changed files with 36 additions and 1 deletions
|
@ -100,6 +100,16 @@ void LibnotifyNotification::Show(const NotificationOptions& options) {
|
|||
nullptr);
|
||||
}
|
||||
|
||||
NotifyUrgency urgency = NOTIFY_URGENCY_NORMAL;
|
||||
if (options.urgency == base::ASCIIToUTF16("critical")) {
|
||||
urgency = NOTIFY_URGENCY_CRITICAL;
|
||||
} else if (options.urgency == base::ASCIIToUTF16("low")) {
|
||||
urgency = NOTIFY_URGENCY_LOW;
|
||||
}
|
||||
|
||||
// Set the urgency level of the notification.
|
||||
libnotify_loader_.notify_notification_set_urgency(notification_, urgency);
|
||||
|
||||
if (!options.icon.drawsNothing()) {
|
||||
GdkPixbuf* pixbuf = libgtkui::GdkPixbufFromSkBitmap(options.icon);
|
||||
libnotify_loader_.notify_notification_set_image_from_pixbuf(notification_,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue