[gnome-calendar] month-view: properly handle all-day events
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] month-view: properly handle all-day events
- Date: Mon, 22 Dec 2014 19:59:02 +0000 (UTC)
commit 442b26b5eaef597d6ebc26de47ab0c796f0e710c
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Mon Dec 22 14:54:05 2014 -0500
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 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c
index 49ee26f..d67ee86 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]