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.
This commit is contained in:
Erick Pérez Castellanos
2015-02-16 09:31:20 -05:00
parent cb0571987a
commit 6ddb9da442
+2 -1
View File
@@ -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);