Merge pull request #211 from 3v1n0/notifications-tags
Notifications tags
This commit is contained in:
commit
2f107fcbe1
8 changed files with 13 additions and 1 deletions
|
@ -80,6 +80,7 @@ LibnotifyNotification::~LibnotifyNotification() {
|
|||
|
||||
void LibnotifyNotification::Show(const base::string16& title,
|
||||
const base::string16& body,
|
||||
const std::string& tag,
|
||||
const GURL& icon_url,
|
||||
const SkBitmap& icon,
|
||||
const bool silent) {
|
||||
|
@ -108,6 +109,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
Add a link
Reference in a new issue