[gnome-calendar] month-view: fix all-day events end-date
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] month-view: fix all-day events end-date
- Date: Fri, 26 Dec 2014 21:57:24 +0000 (UTC)
commit 11324a6712e14c8d44fa7fc9f4b5a8dc1b88cf05
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Fri Dec 26 16:53:05 2014 -0500
month-view: fix all-day events end-date
All-day events has an end-date one day after they really end.
src/gcal-month-view.c | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c
index b6ccf86..db93910 100644
--- a/src/gcal-month-view.c
+++ b/src/gcal-month-view.c
@@ -1571,25 +1571,21 @@ gcal_month_view_button_release (GtkWidget *widget,
start_date->day -= priv->days_delay;
start_date->is_date = 1;
- if (priv->start_mark_cell != priv->end_mark_cell)
- {
- end_date = gcal_dup_icaltime (priv->date);
- end_date->day = j - priv->days_delay;
- end_date->is_date = 1;
+ end_date = gcal_dup_icaltime (priv->date);
+ end_date->day = j - priv->days_delay + 1;
+ end_date->is_date = 1;
- if (start_date->day > end_date->day)
- {
- gint day = start_date->day;
- start_date->day = end_date->day;
- end_date->day = day;
- }
+ if (start_date->day > end_date->day)
+ {
+ gint day = start_date->day;
+ start_date->day = end_date->day;
+ end_date->day = day;
}
g_signal_emit_by_name (GCAL_VIEW (widget), "create-event", start_date, end_date, x, y);
g_free (start_date);
- if (end_date != NULL)
- g_free (end_date);
+ g_free (end_date);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]