NotificationSource GnomeGoal



Hello desktop-developers,

As you may have noticed, we landed the new notifications panel in
gnome-control-center 3.7.3, but that panel is completely empty no
matter what.
That's because it is filled from two sources: static data from
.desktop files, and dynamic data from past notifications.

The latter source should not concern you, and will work out of the box
with all reasonable applications, except that the required gnome-shell
work did not land in 3.7.3.
On the other hand, the interesting part here is static application
registration. Lacking any better idea, this is implemented by looking
at the desktop file for a boolean key called
"X-GNOME-UsesNotifications".
Therefore, I updated the GnomeGoal mentioned in the subject ([1]). If
you develop an application that uses libnotify, please add
X-GNOME-UsesNotifications to the desktop file.

At the same time, you need to make sure that the application is
correctly associated with its stored policy. As I said above, for
regular apps this requires no changes. By regular I mean: sending
notifications from the same process, having a desktop file that is
tracked via WM_CLASS by the shell and having at least one visible
window when the notification is send. If any of those conditions may
not be satisfied, you must set the 'desktop-entry' hint to the
basename of you desktop file, without the final '.desktop'.

For those of you interested, the policy is stored in dconf at
/org/gnome/desktop/notifications/application/<canonical-app-id>/,
where <canonical-app-id> is the desktop-entry hint value with
everything but ascii A-Za-z0-9 replaced with -. This means that the
policy can be overridden for individual applications with dconf
profile files. You can't use schema overrides because there is one
shared schema for all applications.

Hope you are not too angry with me for the new work, and enjoy the new feature!

Giovanni

[1] https://live.gnome.org/GnomeGoals/NotificationSource


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]