From 481569543da0e958c95ae616e1ae80d81b6bd8c5 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Mon, 3 Mar 2025 19:12:09 -0600 Subject: [PATCH] on_schedule_type_changed_cb(): Don't frob the widgets here Converting the start/end dates to local time is done to get them to display as the user expects. Instead, let's change things so that they are actually computed and handled correctly. Part-of: --- src/gui/event-editor/gcal-schedule-section.c | 21 -------------------- 1 file changed, 21 deletions(-) diff --git a/src/gui/event-editor/gcal-schedule-section.c b/src/gui/event-editor/gcal-schedule-section.c index eb05160c..17eed558 100644 --- a/src/gui/event-editor/gcal-schedule-section.c +++ b/src/gui/event-editor/gcal-schedule-section.c @@ -303,27 +303,6 @@ on_schedule_type_changed_cb (GtkWidget *widget, gboolean all_day = all_day_selected (self); GcalScheduleValues *updated = gcal_schedule_values_set_all_day (self->values, all_day); update_from_values (self, updated); - - block_date_signals (self); - - if (all_day) - { - g_autoptr (GDateTime) start_local = NULL; - g_autoptr (GDateTime) end_local = NULL; - - GDateTime *start = gcal_date_time_chooser_get_date_time (self->start_date_time_chooser); - GDateTime *end = gcal_date_time_chooser_get_date_time (self->end_date_time_chooser); - - start_local = g_date_time_to_local (start); - end_local = g_date_time_to_local (end); - - gcal_date_chooser_row_set_date (self->start_date_row, start_local); - gcal_date_chooser_row_set_date (self->end_date_row, end_local); - gcal_date_time_chooser_set_date_time (self->start_date_time_chooser, start_local); - gcal_date_time_chooser_set_date_time (self->end_date_time_chooser, end_local); - } - - unblock_date_signals (self); } static void