Create only DISPLAY alarms in reminders, not AUDIO

Creating "AUDIO" VALARM notification actions causes endless problems:
users may only hear a sound notification (with no visuals), if at all,
and most other apps don't honor nor support editing audio-only alarms.
Other systems typically play a sound automatically on "DISPLAY" alarms.

https://datatracker.ietf.org/doc/html/rfc5545#section-3.6.6 says:

> Multiple mutually independent "VALARM" calendar components
> can be specified for a single "VEVENT" or "VTODO" calendar component.

However, each component states:

> 'action' and 'trigger' are both REQUIRED,
> but MUST NOT occur more than once.

To keep the UI simple, we should pick one or the other; "DISPLAY" it is.
Remove "AUDIO" alarm code and add a warning to never add it again.

Fixes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1280
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/680>
This commit is contained in:
Jean-François Fortin Tam
2026-01-16 01:18:28 +00:00
committed by Marge Bot
parent c3635967bc
commit ab76cd59be
3 changed files with 6 additions and 40 deletions
@@ -128,7 +128,12 @@ create_alarm (guint minutes)
alarm = e_cal_component_alarm_new ();
e_cal_component_alarm_take_trigger (alarm, trigger);
e_cal_component_alarm_set_action (alarm, E_CAL_COMPONENT_ALARM_AUDIO);
/* ONLY create "DISPLAY" alarm types. Don't expose "AUDIO" as an alarm type possibility for users to create;
* they're mutually independent from "DISPLAY" in RFC5545, and audio-only alarms are useless for users in practice.
* Furthermore, some other applications don't even allow creating/viewing/editing audio-only alarms on events!
* We should instead expect alarm notification systems to automatically play sounds when displaying notifications. */
e_cal_component_alarm_set_action (alarm, E_CAL_COMPONENT_ALARM_DISPLAY);
return alarm;
}