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"
This commit is contained in:
Erick Pérez Castellanos
2012-12-05 16:55:31 -05:00
parent 6b0e15a1d7
commit 5a5d01a4d7
+8
View File
@@ -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,