month-view: properly handle all-day events

Note: when the marking of break events is made, this have to be taken
into account.
This commit is contained in:
Erick Pérez Castellanos
2014-12-22 14:54:05 -05:00
parent 5a36689e07
commit 442b26b5ea
+10 -2
View File
@@ -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);