aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/print.c
diff options
context:
space:
mode:
authorSeth Alves <alves@src.gnome.org>2000-06-08 03:59:48 +0800
committerSeth Alves <alves@src.gnome.org>2000-06-08 03:59:48 +0800
commit35c55267f22a30cccd78e1f45efdd2e4b353fd94 (patch)
tree880acbc384eec12469bb2e8a41eae9c7dd997164 /calendar/gui/print.c
parentf0e9a692608d04c14f2060f32b18c91bf8b2982d (diff)
downloadgsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.tar
gsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.tar.gz
gsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.tar.bz2
gsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.tar.lz
gsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.tar.xz
gsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.tar.zst
gsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.zip
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
Diffstat (limited to 'calendar/gui/print.c')
-rw-r--r--calendar/gui/print.c69
1 files changed, 15 insertions, 54 deletions
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index 436221ebc6..3b4f2c4a18 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -567,33 +567,20 @@ print_day_details (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence,
for (i = 0, l = events; l != NULL; l = l->next, i++) {
CalObjInstance *coi;
- char *str_ico;
iCalObject *ico;
- CalObjFindStatus status;
+ CalClientGetStatus status;
coi = l->data;
- str_ico = cal_client_get_object (gcal->client, coi->uid);
-
- if (!str_ico) {
- /* The object could have disappeared from the server */
- continue;
- }
-
- status = ical_object_find_in_string (coi->uid, str_ico, &ico);
- g_free (str_ico);
+ status = cal_client_get_object (gcal->client, coi->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 ("print_day_details(): syntax error in fetched object");
continue;
-
- case CAL_OBJ_FIND_NOT_FOUND:
- g_message ("print_day_details(): could not find fetched object");
- continue;
}
y = top - (top - bottom) * (coi->start - start) / (end - start) - 1;
@@ -676,33 +663,20 @@ print_day_summary (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence,
for (i=0, l = events; l != NULL; l = l->next, i++) {
CalObjInstance *coi;
- char *str_ico;
iCalObject *ico;
- CalObjFindStatus status;
+ CalClientGetStatus status;
coi = l->data;
- str_ico = cal_client_get_object (gcal->client, coi->uid);
-
- if (!str_ico) {
- /* The object could have disappeared from the server */
- continue;
- }
-
- status = ical_object_find_in_string (coi->uid, str_ico, &ico);
- g_free (str_ico);
+ status = cal_client_get_object (gcal->client, coi->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 ("print_day_summary(): syntax error in fetched object");
continue;
-
- case CAL_OBJ_FIND_NOT_FOUND:
- g_message ("print_day_summary(): could not find fetched object");
- continue;
}
x = left + incsmall;
@@ -898,32 +872,19 @@ print_todo_details (GnomePrintContext *pc, GnomeCalendar *gcal, time_t start, ti
yend = bottom - 2;
for (i = 0, l = todos; l != NULL; l = l->next, i++) {
- char *str_ico;
iCalObject *ico;
- CalObjFindStatus status;
-
- str_ico = cal_client_get_object (gcal->client, l->data);
-
- if (!str_ico) {
- /* The object could have disappeared from the server */
- continue;
- }
+ CalClientGetStatus status;
- status = ical_object_find_in_string (l->data, str_ico, &ico);
- g_free (str_ico);
+ status = cal_client_get_object (gcal->client, l->data, &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_NOT_FOUND:
+ case CAL_CLIENT_GET_SYNTAX_ERROR:
g_message ("print_todo_details(): syntax error in fetched object");
continue;
-
- case CAL_OBJ_FIND_NOT_FOUND:
- g_message ("print_todo_details(): could not find fetched object");
- continue;
}
x = left;