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:
committed by
Marge Bot
parent
c3635967bc
commit
ab76cd59be
@@ -207,7 +207,6 @@ setup_alarm (GcalAlarmRow *self)
|
||||
{
|
||||
g_autofree gchar *formatted_duration = NULL;
|
||||
ECalComponentAlarmTrigger *trigger;
|
||||
ECalComponentAlarmAction action;
|
||||
ICalDuration *duration;
|
||||
|
||||
trigger = e_cal_component_alarm_get_trigger (self->alarm);
|
||||
@@ -215,9 +214,6 @@ setup_alarm (GcalAlarmRow *self)
|
||||
formatted_duration = format_alarm_duration (duration);
|
||||
|
||||
adw_preferences_row_set_title (ADW_PREFERENCES_ROW (self), formatted_duration);
|
||||
|
||||
action = e_cal_component_alarm_get_action (self->alarm);
|
||||
gtk_toggle_button_set_active (self->volume_button, action == E_CAL_COMPONENT_ALARM_AUDIO);
|
||||
}
|
||||
|
||||
|
||||
@@ -232,28 +228,6 @@ on_remove_button_clicked_cb (GtkButton *button,
|
||||
g_signal_emit (self, signals[REMOVE_ALARM], 0);
|
||||
}
|
||||
|
||||
static void
|
||||
on_sound_toggle_changed_cb (GtkToggleButton *button,
|
||||
GParamSpec *pspec,
|
||||
GcalAlarmRow *self)
|
||||
{
|
||||
ECalComponentAlarmAction action;
|
||||
gboolean has_sound;
|
||||
|
||||
has_sound = gtk_toggle_button_get_active (button);
|
||||
|
||||
/* Setup the alarm action */
|
||||
action = has_sound ? E_CAL_COMPONENT_ALARM_AUDIO : E_CAL_COMPONENT_ALARM_DISPLAY;
|
||||
|
||||
e_cal_component_alarm_set_action (self->alarm, action);
|
||||
|
||||
/* Update the volume icon */
|
||||
gtk_button_set_icon_name (GTK_BUTTON (self->volume_button),
|
||||
has_sound ? "audio-volume-high-symbolic" : "audio-volume-muted-symbolic");
|
||||
|
||||
g_signal_emit (self, signals[UPDATE_ALARM], 0);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* GObject overrides
|
||||
@@ -348,7 +322,6 @@ gcal_alarm_row_class_init (GcalAlarmRowClass *klass)
|
||||
gtk_widget_class_bind_template_child (widget_class, GcalAlarmRow, volume_button);
|
||||
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_remove_button_clicked_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_sound_toggle_changed_cb);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user