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'd prefer we not break the world.<br><br>I don'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't been a priority, I don'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'd still have to send the image data.<br>
<br>I'd rather image_path be a convenience of libnotify'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"><<a href="mailto:awalton@gnome.org">awalton@gnome.org</a>></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 <<a href="mailto:aurelien.gateau@canonical.com">aurelien.gateau@canonical.com</a>>:<br>
<div class="im">> Hello again,<br>
><br>
> In this mail I would like to address the first issue from the<br>
> notification spec I mentioned in my earlier mail: Ability to assign an<br>
> icon *and* an image to a notification.<br>
><br>
> KDE notifications need to be able to show an icon and an image at the<br>
> same time. This is because KDE notifications can show an icon to the<br>
> left of the notification summary and an image to the left of the body<br>
> (see attached screenshot).<br>
><br>
> As of KDE 4.3, KDE uses its own DBus interface, which is quite similar<br>
> to the org.freedesktop.Notifications except the "icon_data" hint is<br>
> named "image_data" and the implementation shows both "app_icon" and<br>
> "image_data" 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's more general.<br>
<div class="im"><br>
><br>
> Proposal:<br>
><br>
> 1. Remove the "icon_data" hint<br>
><br>
> 2. Add an "image" component to the notification, which would be<br>
> represented as two parameters in the Notify() method: image_type and<br>
> image_data.<br>
><br>
> image_type: an int which can take the following values, indicating what<br>
> image_data contains:<br>
> 0: no icon<br>
> 1: an icon name in a freedesktop.org-compliant icon theme<br>
> 2: path to an existing image on disk<br>
> 3: argb32 data represented as iiay (width, height, array of pixels)<br>
> (This is a simplified version of the actual "icon_data" hint, which<br>
> is a bit over-engineered.)<br>
><br>
> image_data: a byte array whose content is interpreted according to the<br>
> 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'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't enough to specify<br>
an image. We'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's a serialized<br>
version of GdkPixbuf, an arbitrary image container object). The<br>
advantage to sending almost any image is that clients don't have to<br>
drag in much in the way of image processing, whereas if we do specify<br>
the type, we'll have to convert any image that'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's icon, and should<br>
be an icon-name as defined in the icon spec, and we say that it'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'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>
><br>
> 3. Define the following policy:<br>
><br>
> """<br>
> A notification can optionally have an image and/or an icon.<br>
><br>
> An implementation must behave in one of these ways:<br>
> - Never show neither image nor icon.<br>
> - Show image if it is set, otherwise show icon.<br>
> - Show both image and icon.<br>
> """<br>
><br>
> What do you think about this?<br>
><br>
> Aurélien<br>
><br>
</div>> _______________________________________________<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>
><br>
><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>