summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2006-02-10 06:36:09 +0000
committerChenthill Palanisamy <pchen@src.gnome.org>2006-02-10 06:36:09 +0000
commit23e534e70bf0240d8751b05c28f1c073c27ef595 (patch)
treee5052f3dd5f01284e1ffbd0153d4f2bcd7d4c853
parent1672ea6d0189c162a82bb7f0a09371b1f6a3ef69 (diff)
downloadevolution-data-server-23e534e70bf0240d8751b05c28f1c073c27ef595.tar.gz
fixes #329566, 329568
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/backends/file/e-cal-backend-file.c25
2 files changed, 32 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 25811aa89..8df986199 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,12 @@
+2006-02-12 Chenthill Palanisamy <pchenthill@novell.com>
+
+ Fixes #329566, #329568
+ * backends/file/e-cal-backend-file.c:
+ (e_cal_backend_file_modify_object): Reset the instance dates of the
+ master object if its a recurring event.
+ (remove_instance): Removed the return statement so that the exception is
+ set in the master object.
+
2006-02-09 Rajeev ramanathan <rajeevramanathan_2004@yahoo.co.in>
* backends/contacts/e-cal-backend-contacts.c: (contact_record_free)
diff --git a/calendar/backends/file/e-cal-backend-file.c b/calendar/backends/file/e-cal-backend-file.c
index 1d7ddd0b1..db9e318dc 100644
--- a/calendar/backends/file/e-cal-backend-file.c
+++ b/calendar/backends/file/e-cal-backend-file.c
@@ -1959,6 +1959,29 @@ e_cal_backend_file_modify_object (ECalBackendSync *backend, EDataCal *cal, const
case CALOBJ_MOD_ALL :
/* in this case, we blow away all recurrences, and start over
with a clean component */
+
+ if (e_cal_util_component_has_recurrences (icalcomp) && rid && *rid) {
+ icaltimetype start, recur = icaltime_from_string (rid);
+
+ start = icalcomponent_get_dtstart (icalcomp);
+
+ /* This means its a instance generated from master object. So replace
+ the dates stored dates from the master object */
+
+ if (icaltime_compare (start, recur)) {
+ 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);
+
+ e_cal_component_set_dtstart (comp, &m_sdate);
+ e_cal_component_set_dtend (comp, &m_endate);
+ e_cal_component_set_recurid (comp, NULL);
+ e_cal_component_commit_sequence (comp);
+ }
+ *new_object = e_cal_component_get_as_string (comp);
+ }
+
/* Remove the old version */
if (old_object)
*old_object = e_cal_component_get_as_string (obj_data->full_object);
@@ -1991,8 +2014,6 @@ remove_instance (ECalBackendFile *cbfile, ECalBackendFileObject *obj_data, const
cbfile->priv->comp = g_list_remove (cbfile->priv->comp, comp);
obj_data->recurrences_list = g_list_remove (obj_data->recurrences_list, comp);
g_hash_table_remove (obj_data->recurrences, rid);
-
- return;
}
/* remove the component from our data, temporarily */