[notification-daemon] Add support for version 1.2 image-data and image-path hints



commit 27801be3da55112b3e32671359ac1d103fd23f23
Author: William Jon McCann <jmccann redhat com>
Date:   Mon Jan 17 17:07:56 2011 -0500

    Add support for version 1.2 image-data and image-path hints

 src/nd-notification.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/nd-notification.c b/src/nd-notification.c
index a53d124..1466fa6 100644
--- a/src/nd-notification.c
+++ b/src/nd-notification.c
@@ -489,9 +489,11 @@ nd_notification_load_image (NdNotification *notification,
 
         pixbuf = NULL;
 
-        if ((data = (GVariant *) g_hash_table_lookup (notification->hints, "image_data"))) {
+        if ((data = (GVariant *) g_hash_table_lookup (notification->hints, "image-data"))
+            || (data = (GVariant *) g_hash_table_lookup (notification->hints, "image_data"))) {
                 pixbuf = _notify_daemon_pixbuf_from_data_hint (data, size);
-        } else if ((data = (GVariant *) g_hash_table_lookup (notification->hints, "image_path"))) {
+        } else if ((data = (GVariant *) g_hash_table_lookup (notification->hints, "image-path"))
+                   || (data = (GVariant *) g_hash_table_lookup (notification->hints, "image_path"))) {
                 if (g_variant_is_of_type (data, G_VARIANT_TYPE ("(s)"))) {
                         const char *path;
                         path = g_variant_get_string (data, NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]