Why does the app-icon parameter for notification change from "audacious" to "audio-x-generic" to "NULL" ?
Added by Jean-Alexandre Anglès d'Auriac over 10 years ago
The app-icon parameter for notification is here, as the name implies, to provide an icon representing the application sending the notification. It is not the same as the image, which is part of the message carried by the notification, and does not usually represent the icon of the application sending the notification.
To make it easier to identify notifications that are sent by Audacious, I think the app-icon parameter should be set to "audacious" for every notification. Notifications that currently use "audio-x-generic" as an application icon could be changed so that they display the "audio-x-generic" icon as an image, and use "audacious" as an application icon.
On most implementation of the notification system, it should not change anything, but it would improve things greatly in others.
For instance, without the change, the notifications look like that in Gnome 3 :
Here is how the notifications look like after the change :
After the modification, all the notifications are clearly identifiable as being sent by Audacious, because they all display the Audacious icon in the left upper corner, and they display the cover as in big image in the body of the notification. I will try to get as soon as possible screenshots of how that change would affect other implementations of the notifications.
Replies (2)
RE: Why does the app-icon parameter for notification change from "audacious" to "audio-x-generic" to "NULL" ? - Added by Jean-Alexandre Anglès d'Auriac over 10 years ago
Apparently, there is a bug in xfce's notifyd, and the covers are not displayed it app_icon is not set to NULL. I will open a bug on XFCE's bugtracker (they do not respect the priorities set in the official specification, see https://people.gnome.org/~mccann/docs/notification-spec/notification-spec-latest.html#icons-and-images ) and on Gnome's bugtracker (they should display the image as big and inside the body no matter if app_icon is set to null or not.
RE: Why does the app-icon parameter for notification change from "audacious" to "audio-x-generic" to "NULL" ? - Added by Jean-Alexandre Anglès d'Auriac over 10 years ago
After looking around, XFCE's implementation seems correct, the problem comes from the fact it implements an old version of the specification. More precisely, it implements version 0.9 while the current version is 1.2.
When speaking to some notification displaying daemon that implements a version of the protocol older than 2.1, libnotify's notify_notification_set_image_from_pixbuf uses parameter icon_data rather than the more recent image_data (2.1) and image-data (2.2).
Since the specification does mention that app-icon takes priority over icon_data, XFCE's notifyd will not display the cover unless app-icon is NULL, and is correct in doing so.
However, it would be a shame to not use the possibilities of the newer specification because of that.
I suggest testing whether the implementation of the notification protocol is too old to support a correct use of app-icon (by using libnotify's notify_get_server_info during the initialization of the plugin). Then we can set app-icon to NULL only when we want to display a cover and the implementation of notifications is less than 1.1, while setting app-icon to "audacious" in every other case.