From 23153c2e82294cda4f3f7db2053186da8581e19a Mon Sep 17 00:00:00 2001 From: kajzer Date: Fri, 2 Sep 2016 16:12:01 +0200 Subject: Add support for GNotification --- src/daemon/daemon.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index 653b27d..eb2fe9b 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c @@ -1416,6 +1416,10 @@ gboolean notify_daemon_notify_handler(NotifyDaemon* daemon, const char* app_name { pixbuf = _notify_daemon_pixbuf_from_data_hint (data); } + else if ((data = (GValue *) g_hash_table_lookup (hints, "image-data"))) + { + pixbuf = _notify_daemon_pixbuf_from_data_hint (data); + } else if ((data = (GValue *) g_hash_table_lookup (hints, "image_path"))) { if (G_VALUE_HOLDS_STRING (data)) @@ -1428,6 +1432,18 @@ gboolean notify_daemon_notify_handler(NotifyDaemon* daemon, const char* app_name g_warning ("notify_daemon_notify_handler expected image_path hint to be of type string"); } } + else if ((data = (GValue *) g_hash_table_lookup (hints, "image-path"))) + { + if (G_VALUE_HOLDS_STRING (data)) + { + const char *path = g_value_get_string (data); + pixbuf = _notify_daemon_pixbuf_from_path (path); + } + else + { + g_warning ("notify_daemon_notify_handler expected image-path hint to be of type string"); + } + } else if (*icon != '\0') { pixbuf = _notify_daemon_pixbuf_from_path (icon); -- cgit v1.2.1