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:
parent
59ed6ad413
commit
1ce34fb8d2
1 changed files with 5 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue