I like the idea of using a hint more. As you said, this is a widely used spec at this point, and libnotify/notification-daemon are not the only implementations of this spec. I&#39;d prefer we not break the world.<br><br>I don&#39;t know about it being image_path though. One very common request has been to add the ability to send notifications to remote servers. While it hasn&#39;t been a priority, I don&#39;t want to rule it out altogether. If we replace our icon implementation with image_path, then that will never work in a remote case. We&#39;d still have to send the image data.<br>

<br>I&#39;d rather image_path be a convenience of libnotify&#39;s API rather than being in the D-BUS API.<br><br>Christian<br><br clear="all">-- <br>Christian Hammond - <a href="mailto:chipx86@chipx86.com">chipx86@chipx86.com</a><br>

Review Board - <a href="http://www.review-board.org">http://www.review-board.org</a><br>VMware, Inc. - <a href="http://www.vmware.com">http://www.vmware.com</a><br>
<br><br><div class="gmail_quote">2009/6/12 A. Walton <span dir="ltr">&lt;<a href="mailto:awalton@gnome.org">awalton@gnome.org</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

2009/6/12 Aurélien Gâteau &lt;<a href="mailto:aurelien.gateau@canonical.com">aurelien.gateau@canonical.com</a>&gt;:<br>
<div class="im">&gt; Hello again,<br>
&gt;<br>
&gt; In this mail I would like to address the first issue from the<br>
&gt; notification spec I mentioned in my earlier mail: Ability to assign an<br>
&gt; icon *and* an image to a notification.<br>
&gt;<br>
&gt; KDE notifications need to be able to show an icon and an image at the<br>
&gt; same time. This is because KDE notifications can show an icon to the<br>
&gt; left of the notification summary and an image to the left of the body<br>
&gt; (see attached screenshot).<br>
&gt;<br>
&gt; As of KDE 4.3, KDE uses its own DBus interface, which is quite similar<br>
&gt; to the org.freedesktop.Notifications except the &quot;icon_data&quot; hint is<br>
&gt; named &quot;image_data&quot; and the implementation shows both &quot;app_icon&quot; and<br>
&gt; &quot;image_data&quot; if they are both set.<br>
<br>
</div>I think this is an inconsistency in the spec, since I seem to recall<br>
one page referring to it as image_data and another as icon_data. Image<br>
data is probably better, since it&#39;s more general.<br>
<div class="im"><br>
&gt;<br>
&gt; Proposal:<br>
&gt;<br>
&gt; 1. Remove the &quot;icon_data&quot; hint<br>
&gt;<br>
&gt; 2. Add an &quot;image&quot; component to the notification, which would be<br>
&gt; represented as two parameters in the Notify() method: image_type and<br>
&gt; image_data.<br>
&gt;<br>
&gt; image_type: an int which can take the following values, indicating what<br>
&gt; image_data contains:<br>
&gt; 0: no icon<br>
&gt; 1: an icon name in a freedesktop.org-compliant icon theme<br>
&gt; 2: path to an existing image on disk<br>
&gt; 3: argb32 data represented as iiay (width, height, array of pixels)<br>
&gt;   (This is a simplified version of the actual &quot;icon_data&quot; hint, which<br>
&gt;   is a bit over-engineered.)<br>
&gt;<br>
&gt; image_data: a byte array whose content is interpreted according to the<br>
&gt; value of image_type.<br>
<br>
</div>The problem with this is that it destroys the backward compatibility<br>
of the spec. Hints are better for a change like this; they&#39;re Hints.<br>
Servers can disregard them and clients can send whatever they want as<br>
hints. The way some of them are defined is a bit clunky right now, but<br>
it should be easier to go about adding a hint than it is to change the<br>
declaration of a well-defined, used-everywhere method.<br>
<br>
Furthermore, width, height and array of pixels isn&#39;t enough to specify<br>
an image. We&#39;d need to say that all images passed over the bus via<br>
this method have to be in a certain format. The way that its defined<br>
right now, almost any image can be sent (basically it&#39;s a serialized<br>
version of GdkPixbuf, an arbitrary image container object). The<br>
advantage to sending almost any image is that clients don&#39;t have to<br>
drag in much in the way of image processing, whereas if we do specify<br>
the type, we&#39;ll have to convert any image that&#39;s not in the right<br>
format to what the server is expecting, which seems ugly to me.<br>
<br>
So, rather than redefining the world, we could just add a new hint:<br>
image_path (somewhere on disk). We leave the app_icon field in the<br>
Notify() method alone since this is the application&#39;s icon, and should<br>
be an icon-name as defined in the icon spec, and we say that it&#39;s<br>
silly to have both image_path and image_data set and prefer one or the<br>
other, probably image_data since we already have that in the spec,<br>
though really that could be implementation defined too.<br>
<br>
If that&#39;s not enough, we can deprecate (not remove) the app_icon field<br>
and add another hint for icon names as an array of strings which might<br>
be a good idea anyways, since this way we could allow fallback icons<br>
to be used in the case an icon theme is missing an icon.<br>
<br>
That way server implementations can decide on what to show and when<br>
and where to show it.<br>
<br>
2cents, etc.<br>
-A. Walton<br>
<div class="im"><br>
&gt;<br>
&gt; 3. Define the following policy:<br>
&gt;<br>
&gt; &quot;&quot;&quot;<br>
&gt; A notification can optionally have an image and/or an icon.<br>
&gt;<br>
&gt; An implementation must behave in one of these ways:<br>
&gt; - Never show neither image nor icon.<br>
&gt; - Show image if it is set, otherwise show icon.<br>
&gt; - Show both image and icon.<br>
&gt; &quot;&quot;&quot;<br>
&gt;<br>
&gt; What do you think about this?<br>
&gt;<br>
&gt; Aurélien<br>
&gt;<br>
</div>&gt; _______________________________________________<br>
&gt; xdg mailing list<br>
&gt; <a href="mailto:xdg@lists.freedesktop.org">xdg@lists.freedesktop.org</a><br>
&gt; <a href="http://lists.freedesktop.org/mailman/listinfo/xdg" target="_blank">http://lists.freedesktop.org/mailman/listinfo/xdg</a><br>
&gt;<br>
&gt;<br>
_______________________________________________<br>
xdg mailing list<br>
<a href="mailto:xdg@lists.freedesktop.org">xdg@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/xdg" target="_blank">http://lists.freedesktop.org/mailman/listinfo/xdg</a><br>
</blockquote></div><br>