Skip to content

Commit

Permalink
notification: Use categories from xdg desktop notification spec
Browse files Browse the repository at this point in the history
The xdg spec¹ uses slightly different names thus making it hard for apps
to use API like `g_notification_set_category` in a way that works for
portaled and non-portaled use cases.

It also makes things slighlty more consistent as the current call.*
sub-categories (`.incoming`, `.ongoing`) indicate a state while the `im`
category indicates a type (`message`).

1) https://specifications.freedesktop.org/notification-spec/1.2/categories.html

Signed-off-by: Guido Günther <[email protected]>
  • Loading branch information
agx committed Oct 31, 2024
1 parent 4f928ee commit 63eee88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/notification.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,11 +889,11 @@ parse_category (GVariantBuilder *builder,
{
const char *category;
const char *supported_categories[] = {
"im.message",
"im.received",
"alarm.ringing",
"call.incoming",
"call.ongoing",
"call.missed",
"call.unanswered",
"weather.warning.extreme",
"cellbroadcast.danger.extreme",
"cellbroadcast.danger.severe",
Expand Down

0 comments on commit 63eee88

Please sign in to comment.