From c52ad9438e7914262f5e139de155180a635c8943 Mon Sep 17 00:00:00 2001 From: Harish Krishnaswamy Date: Thu, 9 Feb 2006 11:42:40 +0000 Subject: Pass the client along with the id for search to handle cases where the 2006-02-09 Harish Krishnaswamy * gui/e-cal-model.c: (e_cal_view_objects_added_cb): Pass the client along with the id for search to handle cases where the same backend source has multiple clients in the view. Remove the FIXME. svn path=/trunk/; revision=31462 --- calendar/gui/e-cal-model.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 3fcd5fbe7a..c3380d0cef 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -1237,7 +1237,6 @@ find_client_data (ECalModel *model, ECal *client) return NULL; } -/* FIXME how do we prevent the same UID is different calendars? */ static ECalModelComponent * search_by_id_and_client (ECalModelPrivate *priv, ECal *client, const ECalComponentId *id) { @@ -1358,12 +1357,13 @@ e_cal_view_objects_added_cb (ECalView *query, GList *objects, gpointer user_data ECalModelComponent *comp_data; ECalComponentId *id; ECalComponent *comp = e_cal_component_new (); + ECal *client = e_cal_view_get_client (query); e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (l->data)); id = e_cal_component_get_id (comp); /* remove the components if they are already present and re-add them */ - while ((comp_data = search_by_id_and_client (priv, NULL, + while ((comp_data = search_by_id_and_client (priv, client, id))) { int pos; -- cgit v1.2.3