From 72d4f45cd1051381a1d6e2d49034a68b3a931e22 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Sun, 23 Jul 2023 23:33:07 -0300 Subject: [PATCH] views/dazzling-month-view: Initialize on current date Calling gcal_view_set_date() ensures that all week rows have their ranges setup. This will be useful later. --- src/gui/views/gcal-dazzling-month-view.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/views/gcal-dazzling-month-view.c b/src/gui/views/gcal-dazzling-month-view.c index 2b11efc1..a774614d 100644 --- a/src/gui/views/gcal-dazzling-month-view.c +++ b/src/gui/views/gcal-dazzling-month-view.c @@ -870,6 +870,8 @@ gcal_dazzling_month_view_class_init (GcalDazzlingMonthViewClass *klass) static void gcal_dazzling_month_view_init (GcalDazzlingMonthView *self) { + g_autoptr (GDateTime) now = NULL; + gtk_widget_init_template (GTK_WIDGET (self)); update_weekday_labels (self); @@ -882,4 +884,7 @@ gcal_dazzling_month_view_init (GcalDazzlingMonthView *self) } gtk_widget_insert_after (self->header, GTK_WIDGET (self), NULL); + + now = g_date_time_new_now_local (); + gcal_view_set_date (GCAL_VIEW (self), now); }