diff options
-rw-r--r-- | calendar/ChangeLog | 9 | ||||
-rw-r--r-- | calendar/gui/e-calendar-view.c | 6 |
2 files changed, 13 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index c62976a0be..4c594821ca 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,12 @@ +2007-06-01 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #321741 + + * gui/e-calendar-view.c: (e_calendar_view_new_appointment_full): + Default first date for appointment or meeting is changed on actual + date if have selected start date in past. (This doesn't affect + double click in calendar view.) + 2007-05-27 Srinivasa Ragavan <sragavan@novell.com> ** Fix for bug #351729 from Milan Crha 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; } |