LibnotifyNotification: use "append" when supported

This behavior can be overridden by just providing unique tags to notifications
This commit is contained in:
Marco Trevisan (Treviño) 2016-04-14 18:31:02 +02:00
parent 8962da380b
commit 83cbc1182d

View file

@ -121,6 +121,16 @@ void LibnotifyNotification::Show(const base::string16& title,
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;
libnotify_loader_.notify_notification_show(notification_, &error);
if (error) {