diff options
author | Chenthill Palanisamy <pchenthill@novell.com> | 2005-02-28 18:23:14 +0000 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2005-02-28 18:23:14 +0000 |
commit | d504f6839217356775cd0c6ce9cda3c692847ebd (patch) | |
tree | 1b7430ddbac4f2f24fb467248190f5076041e3e2 | |
parent | 977b205b651aa02d4690f457b1ea7c191f7c8f62 (diff) | |
download | evolution-data-server-d504f6839217356775cd0c6ce9cda3c692847ebd.tar.gz |
Check if the component type is the same as the backend kind before sending
2005-02-28 Chenthill Palanisamy <pchenthill@novell.com>
* backends/groupwise/e-cal-backend-groupwise.c:
(get_deltas): Check if the component type is the same
as the backend kind before sending notification to the
view.
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/backends/groupwise/e-cal-backend-groupwise.c | 21 |
2 files changed, 21 insertions, 7 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index e7b27014d..bfa38ca6b 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,12 @@ 2005-02-28 Chenthill Palanisamy <pchenthill@novell.com> + * backends/groupwise/e-cal-backend-groupwise.c: + (get_deltas): Check if the component type is the same + as the backend kind before sending notification to the + view. + +2005-02-28 Chenthill Palanisamy <pchenthill@novell.com> + Fixes #72958 * backends/groupwise/e-cal-backend-groupwise.c: (e_cal_backend_groupwise_create_object): If the server diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise.c b/calendar/backends/groupwise/e-cal-backend-groupwise.c index 533ce3c55..c035f579c 100644 --- a/calendar/backends/groupwise/e-cal-backend-groupwise.c +++ b/calendar/backends/groupwise/e-cal-backend-groupwise.c @@ -191,6 +191,7 @@ get_deltas (gpointer handle) EGwConnection *cnc; ECalBackendCache *cache; EGwConnectionStatus status; + icalcomponent_kind kind; GSList *item_list, *cache_keys, *l; char *comp_str; char *time_string = NULL; @@ -201,6 +202,7 @@ get_deltas (gpointer handle) return FALSE; cbgw = (ECalBackendGroupwise *) handle; priv= cbgw->priv; + kind = e_cal_backend_get_kind (E_CAL_BACKEND (cbgw)); cnc = priv->cnc; cache = priv->cache; item_list = NULL; @@ -253,9 +255,11 @@ get_deltas (gpointer handle) if (!e_cal_backend_cache_put_component (cache, comp)) g_message ("Could not add the component"); else { - comp_str = e_cal_component_get_as_string (comp); - e_cal_backend_notify_object_created (E_CAL_BACKEND (cbgw), comp_str); - g_free (comp_str); + if (kind == icalcomponent_isa (e_cal_component_get_icalcomponent (comp))) { + comp_str = e_cal_component_get_as_string (comp); + e_cal_backend_notify_object_created (E_CAL_BACKEND (cbgw), comp_str); + g_free (comp_str); + } } } else @@ -305,10 +309,12 @@ get_deltas (gpointer handle) e_cal_component_commit_sequence (modified_comp); e_cal_component_commit_sequence (cache_comp); - cache_comp_str = e_cal_component_get_as_string (cache_comp); - e_cal_backend_notify_object_modified (E_CAL_BACKEND (cbgw), cache_comp_str, e_cal_component_get_as_string (modified_comp)); + if (kind == icalcomponent_isa (e_cal_component_get_icalcomponent (modified_comp))) { + cache_comp_str = e_cal_component_get_as_string (cache_comp); + e_cal_backend_notify_object_modified (E_CAL_BACKEND (cbgw), cache_comp_str, e_cal_component_get_as_string (modified_comp)); + g_free (cache_comp_str); + } e_cal_backend_cache_put_component (cache, modified_comp); - g_free (cache_comp_str); g_object_unref (item); g_object_unref (modified_comp); } @@ -567,8 +573,9 @@ connect_to_server (ECalBackendGroupwise *cbgw) /* get the ID for the container */ if (priv->container_id) g_free (priv->container_id); - + kind = e_cal_backend_get_kind (E_CAL_BACKEND (cbgw)); + if (kind == ICAL_VEVENT_COMPONENT) { priv->container_id = g_strdup (e_gw_connection_get_container_id (priv->cnc, "Calendar")); e_source_set_name (e_cal_backend_get_source (E_CAL_BACKEND (cbgw)), _("Calendar")); |