From e8647eb82939fbd13f12476a03621d2ffecae1fa Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Mon, 15 Feb 2016 21:11:17 -0200 Subject: [PATCH] month-view: use the event's dates instead of widget's ones Conceptually, we need to compare the event's dates to make sure we're allocating the widgets correctly, as widget's dates may not represent the event's ones. --- src/gcal-month-view.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c index e0d46181..173cf27a 100644 --- a/src/gcal-month-view.c +++ b/src/gcal-month-view.c @@ -1105,7 +1105,7 @@ gcal_month_view_size_allocate (GtkWidget *widget, * month. Otherwise, the first cell is the 1st day of the month. */ j = 1; - date = gcal_event_widget_get_date_start (l->data); + date = gcal_event_get_date_start (event); if (g_date_time_get_month (date) == priv->date->month) j = g_date_time_get_day_of_month (date); @@ -1123,7 +1123,7 @@ gcal_month_view_size_allocate (GtkWidget *widget, * if the event is all day or not. */ j = icaltime_days_in_month (priv->date->month, priv->date->year); - date = gcal_event_widget_get_date_end (GCAL_EVENT_WIDGET (child_widget)); + date = gcal_event_get_date_end (event); if (g_date_time_get_month (date) == priv->date->month) {