reminders-section: make alarm sound changes persistent

When the alarm sound changes, the change is not updated because
gcal-manager does not see the changes.

We now update the components and make more comparisons so that
it can be seen by gcal-manager
This commit is contained in:
Abdullahi Usman
2024-07-09 19:47:13 +00:00
committed by Georges Basile Stavracas Neto
parent 420a126ddb
commit d8e2fd6d81
3 changed files with 60 additions and 1 deletions
+10
View File
@@ -46,6 +46,7 @@ enum
enum
{
UPDATE_ALARM,
REMOVE_ALARM,
N_SIGNALS,
};
@@ -250,6 +251,7 @@ on_sound_toggle_changed_cb (GtkToggleButton *button,
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);
}
@@ -332,6 +334,14 @@ gcal_alarm_row_class_init (GcalAlarmRowClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE,
0);
signals[UPDATE_ALARM] = g_signal_new ("update-alarm",
GCAL_TYPE_ALARM_ROW,
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE,
0);
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/ui/event-editor/gcal-alarm-row.ui");