From 35c55267f22a30cccd78e1f45efdd2e4b353fd94 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Wed, 7 Jun 2000 19:59:48 +0000 Subject: instead of returning a text representation, decode the text and return an * cal-client/cal-client.c (cal_client_get_object): instead of returning a text representation, decode the text and return an iCalObject. Also added CalClientGetStatus which indicates success or type of failure. * cal-util/calobj.c (ical_object_find_in_string): #ifed out ical_object_find_in_string since it is unused now. * cal-client/client-test.c (list_uids): track get_object change * gui/calendar-commands.c (calendar_iterate): same * gui/e-day-view.c (e_day_view_update_event): same * gui/e-week-view.c (e_week_view_update_event): same * gui/print.c (print_day_details): same (print_day_summary): same (print_todo_details): same * gui/gnome-cal.c (trigger_alarm_cb): same * gui/gncal-todo.c (gncal_todo_update): same svn path=/trunk/; revision=3463 --- calendar/gui/gncal-todo.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'calendar/gui/gncal-todo.c') diff --git a/calendar/gui/gncal-todo.c b/calendar/gui/gncal-todo.c index 1f7fd3bb59..e3c25b9e53 100644 --- a/calendar/gui/gncal-todo.c +++ b/calendar/gui/gncal-todo.c @@ -800,8 +800,7 @@ void gncal_todo_update (GncalTodo *todo, iCalObject *ico, int flags) { GSList *current_list; - - CalObjFindStatus st; + CalClientGetStatus status; GList *l, *uids; g_return_if_fail (todo != NULL); @@ -864,15 +863,16 @@ gncal_todo_update (GncalTodo *todo, iCalObject *ico, int flags) CALOBJ_TYPE_TODO); for (l = uids; l; l = l->next){ char *uid = l->data; - char *obj_string = - cal_client_get_object (todo->calendar->client, uid); - iCalObject *obj = NULL; - - st = ical_object_find_in_string (uid, obj_string, &obj); - g_free (obj_string); - - insert_in_clist (todo, obj); - ical_object_unref (obj); + iCalObject *obj; + + status = cal_client_get_object (todo->calendar->client, uid, &ico); + + if (status == CAL_CLIENT_GET_SUCCESS) { + insert_in_clist (todo, obj); + ical_object_unref (obj); + } +#warning "FIX ME" + /* else? */ g_free (uid); } g_list_free (uids); -- cgit v1.2.3