Commit 94b82240 authored by Guido Gunther's avatar Guido Gunther
Browse files

notify-feedback: Adjust event name based on notification category

Adjust the emitted feedback based on the notifaction category¹. We could
use the sound-name instead or invent x-phosh-event-name (and might even
add support for that later on) but that has the problem that the
application sometimes has a hard time to figure out what the appropriate
event is. E.g. `message-missed-instant` and `message-new-instant` are
hard to tell apart from an application PoV.

1: https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html

Signed-off-by: Guido Gunther's avatarGuido Günther <guido.gunther@puri.sm>
parent 905c5699
Pipeline #69690 passed with stages
in 49 minutes and 1 second
......@@ -61,7 +61,17 @@ find_event (const char *category)
const char *ret = NULL;
if (locked) {
ret = "message-missed-notification";
if (g_strcmp0 (category, "im.received") == 0)
ret = "message-missed-instant";
else if (g_strcmp0 (category, "email.arrived") == 0)
ret = "message-missed-email";
else
ret = "message-missed-notification";
} else {
if (g_strcmp0 (category, "im.received") == 0)
ret = "message-new-instant";
else if (g_strcmp0 (category, "email.arrived") == 0)
ret = "message-new-email";
}
return ret;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment