From 442b26b5eaef597d6ebc26de47ab0c796f0e710c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erick=20P=C3=A9rez=20Castellanos?= Date: Mon, 22 Dec 2014 14:54:05 -0500 Subject: [PATCH] month-view: properly handle all-day events Note: when the marking of break events is made, this have to be taken into account. --- src/gcal-month-view.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c index 49ee26ff..d67ee869 100644 --- a/src/gcal-month-view.c +++ b/src/gcal-month-view.c @@ -938,8 +938,16 @@ gcal_month_view_size_allocate (GtkWidget *widget, j = icaltime_days_in_month (priv->date->month, priv->date->year); date = gcal_event_widget_peek_end_date (GCAL_EVENT_WIDGET (child_widget)); - if (date->month == priv->date->month) - j = date->day; + if (gcal_event_widget_get_all_day (GCAL_EVENT_WIDGET (child_widget))) + { + if (date->month == priv->date->month) + j = date->day - 1; + } + else + { + if (date->month == priv->date->month) + j = date->day; + } j += priv->days_delay; last_cell = 7 * ((j - 1) / 7)+ 6 * priv->k + sw * ((j - 1) % 7);