From 6ddb9da442762574f07a1982e5108da7ee52472c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erick=20P=C3=A9rez=20Castellanos?= Date: Sun, 15 Feb 2015 11:19:00 -0500 Subject: [PATCH] month-view: fix range selection We add one day in order to have the all-day event span the selected days. If the range was selected from large day to a shorter one this was chopping one day of the range. Adding the extra day after the range has been sorted. --- src/gcal-month-view.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c index e1504fe6..b7070079 100644 --- a/src/gcal-month-view.c +++ b/src/gcal-month-view.c @@ -1569,7 +1569,7 @@ gcal_month_view_button_release (GtkWidget *widget, start_date->is_date = 1; end_date = gcal_dup_icaltime (priv->date); - end_date->day = j - priv->days_delay + 1; + end_date->day = j - priv->days_delay; end_date->is_date = 1; if (start_date->day > end_date->day) @@ -1578,6 +1578,7 @@ gcal_month_view_button_release (GtkWidget *widget, start_date->day = end_date->day; end_date->day = day; } + end_date->day += 1 ; g_signal_emit_by_name (GCAL_VIEW (widget), "create-event", start_date, end_date, x, y);