LibnotifyNotification: use "append" when supported
This behavior can be overridden by just providing unique tags to notifications
This commit is contained in:
parent
8962da380b
commit
83cbc1182d
1 changed files with 10 additions and 0 deletions
|
@ -121,6 +121,16 @@ void LibnotifyNotification::Show(const base::string16& title,
|
||||||
g_object_set(G_OBJECT(notification_), "id", id, NULL);
|
g_object_set(G_OBJECT(notification_), "id", id, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Always try to append notifications.
|
||||||
|
// Unique tags can be used to prevent this.
|
||||||
|
if (HasCapability("append")) {
|
||||||
|
libnotify_loader_.notify_notification_set_hint_string(
|
||||||
|
notification_, "append", "true");
|
||||||
|
} else if (HasCapability("x-canonical-append")) {
|
||||||
|
libnotify_loader_.notify_notification_set_hint_string(
|
||||||
|
notification_, "x-canonical-append", "true");
|
||||||
|
}
|
||||||
|
|
||||||
GError* error = nullptr;
|
GError* error = nullptr;
|
||||||
libnotify_loader_.notify_notification_show(notification_, &error);
|
libnotify_loader_.notify_notification_show(notification_, &error);
|
||||||
if (error) {
|
if (error) {
|
||||||
|
|
Loading…
Reference in a new issue