diff options
| author | Milan Crha <mcrha@redhat.com> | 2007-11-28 18:46:23 +0000 |
|---|---|---|
| committer | Milan Crha <mcrha@src.gnome.org> | 2007-11-28 18:46:23 +0000 |
| commit | 6913ed0ccf40ed2493dc08368d4f15fa8d413d3b (patch) | |
| tree | ff6ef4378287e3eecbccd225a217551c92b0a3a1 | |
| parent | fda58d31e2252fa8a7c2866849b4b6a627f49ff9 (diff) | |
| download | evolution-data-server-6913ed0ccf40ed2493dc08368d4f15fa8d413d3b.tar.gz | |
** Fix for bug #415817
2007-11-28 Milan Crha <mcrha@redhat.com>
** Fix for bug #415817
* backends/file/e-cal-backend-file.c:
(e_cal_backend_file_modify_object): Update start/end time for
recurrence instances even when only end time has been changed.
svn path=/branches/gnome-2-20/; revision=8256
| -rw-r--r-- | calendar/ChangeLog | 8 | ||||
| -rw-r--r-- | calendar/backends/file/e-cal-backend-file.c | 25 |
2 files changed, 29 insertions, 4 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 1dc65645d..f86857208 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,11 @@ +2007-11-28 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #415817 + + * backends/file/e-cal-backend-file.c: + (e_cal_backend_file_modify_object): Update start/end time for + recurrence instances even when only end time has been changed. + 2007-11-16 Milan Crha <mcrha@redhat.com> ** Fix for bug #300584 by Peter Lord diff --git a/calendar/backends/file/e-cal-backend-file.c b/calendar/backends/file/e-cal-backend-file.c index c60ef15ba..0d7c32827 100644 --- a/calendar/backends/file/e-cal-backend-file.c +++ b/calendar/backends/file/e-cal-backend-file.c @@ -2062,18 +2062,32 @@ e_cal_backend_file_modify_object (ECalBackendSync *backend, EDataCal *cal, const recur.zone = start.zone; if (icaltime_compare_date_only (start, recur) == 0) { + icaltimetype end = icalcomponent_get_dtend (icalcomp); ECalComponentDateTime m_sdate, m_endate; e_cal_component_get_dtstart (obj_data->full_object, &m_sdate); e_cal_component_get_dtend (obj_data->full_object, &m_endate); - if (icaltime_compare (start, recur) != 0) { - icaltimetype end = icalcomponent_get_dtend (icalcomp); + if (icaltime_compare (start, recur) != 0 || + !m_endate.value || + icaltime_compare (end, *(m_endate.value)) != 0) { m_sdate.value->hour = start.hour; m_sdate.value->minute = start.minute; - m_sdate.value->second = - + m_sdate.value->second = start.second; + + if (!m_endate.value) { + /* create one if not exists and make same date + and time zone like start */ + m_endate.value = g_new (struct icaltimetype, 1); + *m_endate.value = *m_sdate.value; + + if (m_endate.tzid) + g_free ((char*)m_endate.tzid); + + m_endate.tzid = g_strdup (m_sdate.tzid); + } + m_endate.value->hour = end.hour; m_endate.value->minute = end.minute; m_endate.value->second = end.second; @@ -2083,6 +2097,9 @@ e_cal_backend_file_modify_object (ECalBackendSync *backend, EDataCal *cal, const e_cal_component_set_dtend (comp, &m_endate); e_cal_component_set_recurid (comp, NULL); e_cal_component_commit_sequence (comp); + + e_cal_component_free_datetime (&m_sdate); + e_cal_component_free_datetime (&m_endate); } e_cal_component_set_recurid (comp, NULL); *new_object = e_cal_component_get_as_string (comp); |
