diff --git a/docs/notification-spec.xml b/docs/notification-spec.xml index 20b379b..f09fd48 100644 --- a/docs/notification-spec.xml +++ b/docs/notification-spec.xml @@ -349,7 +349,7 @@ The icon is defined by the "app_icon" parameter. - The image can be defined by the "image_path", the "image_data" hint or the + The image can be defined by the "image-path", the "image-data" hint or the deprecated "icon_data" hint. @@ -358,8 +358,8 @@ An implementation which only displays one image or icon must choose which one to display using the following order: - "image_data" - "image_path" + "image-data" + "image-path" app_icon parameter for compatibility reason, "icon_data" @@ -370,8 +370,8 @@ icon from the "app_icon" parameter and choose which image to display using the following order: - "image_data" - "image_path" + "image-data" + "image-path" for compatibility reason, "icon_data" @@ -380,12 +380,12 @@ Formats - The "image_data" and "icon_data" hints should be a raw image data structure + The "image-data" and "icon_data" hints should be a raw image data structure of signature (iiibiiay) which describes the width, height, rowstride, has alpha, bits per sample, channels and image data respectively. - The "app_icon" parameter and "image_path" hint should be either an URI + The "app_icon" parameter and "image-path" hint should be either an URI (file:// is the only URI schema supported right now) or a name in a freedesktop.org-compliant icon theme (not a GTK+ stock ID). @@ -685,14 +685,30 @@ - "image_data" + "image-data" (iiibiiay) This is a raw data image format which describes the width, height, rowstride, has alpha, bits per sample, channels and image data respectively. - >= 1.1 + >= 1.2 + + + "image_data" + (iiibiiay) + + Deprecated. Use image-data instead. + + = 1.1 + + + "image-path" + string + + Alternative way to define the notification image. See . + + >= 1.2 "image_path" @@ -700,13 +716,13 @@ Alternative way to define the notification image. See . - >= 1.1 + = 1.1 "icon_data" (iiibiiay) - Deprecated. Use image_data instead. + Deprecated. Use image-data instead. < 1.1 diff --git a/libnotify/notification.c b/libnotify/notification.c index 3478f90..6f20fbf 100644 --- a/libnotify/notification.c +++ b/libnotify/notification.c @@ -682,7 +682,9 @@ notify_notification_set_image_from_pixbuf (NotifyNotification *notification, g_return_if_fail (pixbuf == NULL || GDK_IS_PIXBUF (pixbuf)); - if (_notify_check_spec_version(1, 1)) { + if (_notify_check_spec_version(1, 2)) { + hint_name = "image-data"; + } else if (_notify_check_spec_version(1, 1)) { hint_name = "image_data"; } else { hint_name = "icon_data";