LibnotifyNotification: add support for notification tag

We set the id of the notification if tag is provided.
As per the protocol, this should cause the old notification with same ID to be replaced.
This commit is contained in:
Marco Trevisan (Treviño) 2016-04-13 06:08:35 +02:00
parent 59ed6ad413
commit 1ce34fb8d2

View file

@ -119,6 +119,11 @@ void LibnotifyNotification::Show(const base::string16& title,
g_object_unref(pixbuf);
}
if (!tag.empty()) {
GQuark id = g_quark_from_string(tag.c_str());
g_object_set(G_OBJECT(notification_), "id", id, NULL);
}
GError* error = nullptr;
libnotify_loader_.notify_notification_show(notification_, &error);
if (error) {