gcal_schedule_section_apply_to_event(): Get the data from GcalScheduleValues, not the widgets

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/550>
This commit is contained in:
Federico Mena Quintero
2025-08-27 20:00:00 -03:00
committed by Georges Basile Stavracas Neto
parent 6f19c32a80
commit 6c0da161a6
+4 -15
View File
@@ -539,22 +539,11 @@ gcal_schedule_section_apply_to_event (GcalScheduleSection *self,
g_autoptr (GDateTime) start_date = NULL; g_autoptr (GDateTime) start_date = NULL;
g_autoptr (GDateTime) end_date = NULL; g_autoptr (GDateTime) end_date = NULL;
GcalRecurrenceFrequency freq; GcalRecurrenceFrequency freq;
gboolean all_day;
GCAL_ENTRY; GCAL_ENTRY;
all_day = all_day_selected (self); start_date = g_date_time_ref (self->values->date_start);
end_date = g_date_time_ref (self->values->date_end);
if (!all_day)
{
start_date = gcal_date_time_chooser_get_date_time (self->start_date_time_chooser);
end_date = gcal_date_time_chooser_get_date_time (self->end_date_time_chooser);
}
else
{
start_date = g_date_time_ref (gcal_date_chooser_row_get_date (self->start_date_row));
end_date = g_date_time_ref (gcal_date_chooser_row_get_date (self->end_date_row));
}
#ifdef GCAL_ENABLE_TRACE #ifdef GCAL_ENABLE_TRACE
{ {
@@ -566,9 +555,9 @@ gcal_schedule_section_apply_to_event (GcalScheduleSection *self,
} }
#endif #endif
gcal_event_set_all_day (event, all_day); gcal_event_set_all_day (event, self->values->all_day);
if (all_day) if (self->values->all_day)
{ {
/* See the comment "While in iCalendar" elsewhere in this file. Here we restore the /* See the comment "While in iCalendar" elsewhere in this file. Here we restore the
* correct date-time for the event. * correct date-time for the event.