Notifications spec: Icons

Aaron J. Seigo aseigo at kde.org
Wed Apr 1 13:52:58 PDT 2009


On Wednesday 01 April 2009, Matthew Paul Thomas wrote:
> Bo Thorsen wrote on 01/04/09 11:07:
> > The goal for these discussions is a single spec that's based on galago,
> > but modified to suit the needs of more groups.
> >
> > It has been suggested to get this done in time for KDE 4.3, which is
> > just over one month away. I don't know about GNOME timing.
>
> How would this affect KDE 4.3? Are KDE developers wanting to implement a
> Galago-compliant notification server, and have KNotification feed into
> it, in the space of a month? Writing a useful notification server is not
> a trivial task. ;-)

we actually did all that work in KDE 4.2. KNotification talks to knotify4, and 
knotify4 forwards it on via dbus if the notification is supposed to show up as 
a passive popup and an appropriate service is registered on the session bus.

the owner of the dbus interface is a Plasma::DataEngine.

all that's left is to sort out the details of the notifications spec, tweak 
the dbus interface we use as needed (the two files that would need modifying 
are both in kdebase ...) and then s,org.kde,org.freedesktop,g

so the implementation stuff is only an hour or two's work at this point for 
myself or one of the other Plasma devs.

> > Proposal: remove this page entirely. all relevant information on icons
> > can be found elsewhere in the spec. duplicating information in this
> > way just begs for inconsistencies over time.
>
> Handily demonstrating Aaron's point, there is already an inconsistency.
> <http://www.galago-project.org/specs/notification/0.9/x344.html> refers
> to an "image_data" hint that, as far as I know, doesn't exist.
> notification-daemon -- and therefore Gnome applications, and therefore
> Notify OSD too -- use "icon_data" instead, as described in
> <http://www.galago-project.org/specs/notification/0.9/x207.html> (the
> page Aaron proposed for deletion).

erg ... icon_data is not a great name since there's really nothing that says 
this image will be used as an icon. as we followed the specification when 
implementing this in plasma, we put in support for image_data and not 
icon_data.

it would be easy to switch it to icon_data, but it would be nice to have the 
better name if possible.

> > Answering
> > (http://lists.freedesktop.org/archives/xdg/2008-April/009409.html) Aaron,
> > Olivier Gouffart writes this about the icons: "icon_data and app_icon are
> > different: Take the Kopete online notification: app_icon is the kopete
> > icon, while icon_data would be the user's avatar." This answer suggests
> > that the application can provide both. But what will the server
> > implementations show, then?
> >...
>
> Notify OSD uses app_icon if it is present, and if it isn't, icon_data if
> it is present. The reason it uses this order (if I remember correctly)
> is that app_icon may be SVG, whereas icon_data is always a bitmap. As a

should this be the other way around? if the application has an icon name it 
can use, it should set app_icon and not set icon_data. if a bitmap is 
supplied, there is probably a reason for that (e.g. it's something like a 
user's avatar or some other image created at runtime), so the server should 
use that by default? the app_icon would then be a fallback so that when 
showing a notification it would be possible (though not required, of course) 
for the visualization to show the originating application as well.

> small step toward resolution independence, Notify OSD scales icons (and
> everything else) relative to the user's font size. While we recognize
> that some icons -- like IM avatars and album art -- will always be
> bitmaps, we prefer scalable icons when they are available. So while
> Olivier's explanation makes sense, it's not particularly practical for
> us. It might be a good idea to introduce a new name for app_icon that
> doesn't mention "app".

hm.. icon_name and icon_data?

> so sending large icons to it is a bad idea. To work around this, we've
> provided example code for applications to scale down icons themselves
> only when notification-daemon is the active notification server
> <https://wiki.ubuntu.com/NotificationDevelopmentGuidelines#blurry>. For
> the future, though, it would be helpful if the notification
> specification made clear that icons can be any size and that the
> notification server is responsible for scaling them to an appropriate size.

how does the server know what an appropriate size is?

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Software

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/xdg/attachments/20090401/8ff2c026/attachment.pgp 


More information about the xdg mailing list