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/gnome-cal.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index e6e7082666..6f05c7ec60 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -619,9 +619,8 @@ static void trigger_alarm_cb (gpointer alarm_id, time_t trigger, gpointer data) { struct trigger_alarm_closure *c; - char *str_ico; iCalObject *ico; - CalObjFindStatus status; + CalClientGetStatus status; ObjectAlarms *oa; GList *l; @@ -629,27 +628,16 @@ trigger_alarm_cb (gpointer alarm_id, time_t trigger, gpointer data) /* Fetch the object */ - str_ico = cal_client_get_object (c->gcal->client, c->uid); - if (!str_ico) { - g_message ("trigger_alarm_cb(): could not fetch object `%s'", c->uid); - return; - } - - status = ical_object_find_in_string (c->uid, str_ico, &ico); - g_free (str_ico); + status = cal_client_get_object (c->gcal->client, c->uid, &ico); switch (status) { - case CAL_OBJ_FIND_SUCCESS: + case CAL_CLIENT_GET_SUCCESS: /* Go on */ break; - - case CAL_OBJ_FIND_SYNTAX_ERROR: + case CAL_CLIENT_GET_SYNTAX_ERROR: + case CAL_CLIENT_GET_NOT_FOUND: g_message ("trigger_alarm_cb(): syntax error in fetched object"); return; - - case CAL_OBJ_FIND_NOT_FOUND: - g_message ("trigger_alarm_cb(): could not find fetched object"); - return; } g_assert (ico != NULL); -- cgit v1.2.3