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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user