From 5a5d01a4d7371a65f74ba4cf660e366d79dec612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erick=20P=C3=A9rez=20Castellanos?= Date: Sat, 1 Dec 2012 23:32:01 -0500 Subject: [PATCH] Fixed ordering of dates in New Event Dialog. When the user selected the months backward the dates on the header of the "New Event" dialog was wrong. The dialog shown "from October 31 to March 01" --- src/gcal-year-view.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gcal-year-view.c b/src/gcal-year-view.c index 0b0e84e1..9db6be0f 100644 --- a/src/gcal-year-view.c +++ b/src/gcal-year-view.c @@ -692,6 +692,14 @@ gcal_year_view_button_release (GtkWidget *widget, end_date->month = priv->end_mark_cell + 1; end_date->is_date = 1; + if (priv->start_mark_cell > priv->end_mark_cell) + { + start_date->month = priv->end_mark_cell + 1; + end_date->day = icaltime_days_in_month (priv->start_mark_cell + 1, + end_date->year); + end_date->month = priv->start_mark_cell + 1; + } + g_signal_emit_by_name (GCAL_VIEW (widget), "create-event", start_date, end_date,