aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-06-02 13:40:10 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-06-02 13:40:10 +0800
commitee9fedd493a2a7da3c568c597a4f6c86b5a8405d (patch)
tree7ef4ff84928f352c1cb44f6cd845fd6221a4e7c0 /calendar/gui
parent7f5cd51bfe1b601c14563d0855006e3de94dfee0 (diff)
downloadgsoc2013-evolution-ee9fedd493a2a7da3c568c597a4f6c86b5a8405d.tar.gz
gsoc2013-evolution-ee9fedd493a2a7da3c568c597a4f6c86b5a8405d.tar.zst
gsoc2013-evolution-ee9fedd493a2a7da3c568c597a4f6c86b5a8405d.zip
** Fix for bug #321741
svn path=/trunk/; revision=33618
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-calendar-view.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index f8cd8d212f..b398c00a27 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -1891,7 +1891,8 @@ e_calendar_view_new_appointment_for (ECalendarView *cal_view,
*
* Opens an event editor dialog for a new appointment. The appointment's
* start and end times are set to the currently selected time range in
- * the calendar view.
+ * the calendar view, with exception when this time is in past, then
+ * current date is used too.
*/
void
e_calendar_view_new_appointment_full (ECalendarView *cal_view, gboolean all_day, gboolean meeting)
@@ -1900,7 +1901,8 @@ e_calendar_view_new_appointment_full (ECalendarView *cal_view, gboolean all_day,
g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
- if (!e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend)) {
+ if (!e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend) ||
+ dtstart / (60 * 60 * 24) < time (NULL) / (60 * 60 * 24)) {
dtstart = time (NULL);
dtend = dtstart + 3600;
}