diff options
author | William Jon McCann <jmccann@redhat.com> | 2011-01-17 16:57:31 -0500 |
---|---|---|
committer | William Jon McCann <jmccann@redhat.com> | 2011-01-17 16:57:31 -0500 |
commit | b20752a2e5cc8315d965b110019f9077557eb49c (patch) | |
tree | 101f5ca47f470b0a1e2b27d8b66cfe1dabec7919 | |
parent | a967c61e5b802b260fd6be23601a4dab579144c9 (diff) | |
download | libnotify-b20752a2e5cc8315d965b110019f9077557eb49c.tar.gz |
Use - instead of _ in hint names consistently
-rw-r--r-- | docs/notification-spec.xml | 38 | ||||
-rw-r--r-- | libnotify/notification.c | 4 |
2 files changed, 30 insertions, 12 deletions
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 @@ </para> <para> 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. </para> <sect2> @@ -358,8 +358,8 @@ An implementation which only displays one image or icon must choose which one to display using the following order: <orderedlist> - <listitem><para>"image_data"</para></listitem> - <listitem><para>"image_path"</para></listitem> + <listitem><para>"image-data"</para></listitem> + <listitem><para>"image-path"</para></listitem> <listitem><para>app_icon parameter</para></listitem> <listitem><para>for compatibility reason, "icon_data"</para></listitem> </orderedlist> @@ -370,8 +370,8 @@ icon from the "app_icon" parameter and choose which image to display using the following order: <orderedlist> - <listitem><para>"image_data"</para></listitem> - <listitem><para>"image_path"</para></listitem> + <listitem><para>"image-data"</para></listitem> + <listitem><para>"image-path"</para></listitem> <listitem><para>for compatibility reason, "icon_data"</para></listitem> </orderedlist> </para> @@ -380,12 +380,12 @@ <sect2 id="icons-and-images-formats" xreflabel="Icons and Images Formats"> <title>Formats</title> <para> - 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. </para> <para> - 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). </para> @@ -685,14 +685,30 @@ <entry/> </row> <row> - <entry><literal>"image_data"</literal></entry> + <entry><literal>"image-data"</literal></entry> <entry>(iiibiiay)</entry> <entry> This is a raw data image format which describes the width, height, rowstride, has alpha, bits per sample, channels and image data respectively. </entry> - <entry>>= 1.1</entry> + <entry>>= 1.2</entry> + </row> + <row> + <entry><literal>"image_data"</literal></entry> + <entry>(iiibiiay)</entry> + <entry> + <emphasis>Deprecated</emphasis>. Use image-data instead. + </entry> + <entry>= 1.1</entry> + </row> + <row> + <entry><literal>"image-path"</literal></entry> + <entry>string</entry> + <entry> + Alternative way to define the notification image. See <xref linkend="icons-and-images"/>. + </entry> + <entry>>= 1.2</entry> </row> <row> <entry><literal>"image_path"</literal></entry> @@ -700,13 +716,13 @@ <entry> Alternative way to define the notification image. See <xref linkend="icons-and-images"/>. </entry> - <entry>>= 1.1</entry> + <entry>= 1.1</entry> </row> <row> <entry><literal>"icon_data"</literal></entry> <entry>(iiibiiay)</entry> <entry> - <emphasis>Deprecated</emphasis>. Use image_data instead. + <emphasis>Deprecated</emphasis>. Use image-data instead. </entry> <entry>< 1.1</entry> </row> 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"; |