Merge pull request #211 from 3v1n0/notifications-tags

Notifications tags
This commit is contained in:
Cheng Zhao 2016-04-13 20:12:37 +09:00
commit 2f107fcbe1
8 changed files with 13 additions and 1 deletions

View file

@ -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) {

View file

@ -22,6 +22,7 @@ class LibnotifyNotification : public Notification {
// Notification:
void Show(const base::string16& title,
const base::string16& msg,
const std::string& tag,
const GURL& icon_url,
const SkBitmap& icon,
const bool silent) override;