diff options
-rw-r--r-- | my-evolution/ChangeLog | 6 | ||||
-rw-r--r-- | my-evolution/e-summary-calendar.c | 5 | ||||
-rw-r--r-- | my-evolution/e-summary-tasks.c | 33 |
3 files changed, 38 insertions, 6 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog index fd98a54e38..00bb0b4b3b 100644 --- a/my-evolution/ChangeLog +++ b/my-evolution/ChangeLog @@ -1,3 +1,9 @@ +2003-08-26 Rodrigo Moya <rodrigo@ximian.com> + + * e-summary-tasks.c: + * e-summary-calendar.c (uids_to_array): use correct type for arguments + to cal_client_get_object. + 2003-08-19 Harry Lu <harry.lu@sun.com> ** For bug #47461. diff --git a/my-evolution/e-summary-calendar.c b/my-evolution/e-summary-calendar.c index 71a25e6f15..8e6b2f972e 100644 --- a/my-evolution/e-summary-calendar.c +++ b/my-evolution/e-summary-calendar.c @@ -267,16 +267,19 @@ uids_to_array (ESummary *summary, for (p = uids; p; p = p->next) { ESummaryCalEvent *event; CalClientGetStatus status; + icalcomponent *icalcomp; event = g_new (ESummaryCalEvent, 1); event->uid = g_strdup (p->data); - status = cal_client_get_object (client, p->data, &event->comp); + status = cal_client_get_object (client, p->data, &icalcomp); if (status != CAL_CLIENT_GET_SUCCESS) { g_free (event); continue; } + event->comp = cal_component_new (); + cal_component_set_icalcomponent (event->comp, icalcomp); if (cal_component_has_recurrences (event->comp) == TRUE) { struct _RecurData *recur; diff --git a/my-evolution/e-summary-tasks.c b/my-evolution/e-summary-tasks.c index e5f61cc343..86a6026d9c 100644 --- a/my-evolution/e-summary-tasks.c +++ b/my-evolution/e-summary-tasks.c @@ -154,6 +154,7 @@ sort_uids (gconstpointer a, gconstpointer b, gpointer user_data) { + icalcomponent *icalcomp_a, *icalcomp_b; CalComponent *comp_a, *comp_b; CalClient *client = user_data; CalClientGetStatus status; @@ -163,14 +164,19 @@ sort_uids (gconstpointer a, /* a after b then return > 0 */ - status = cal_client_get_object (client, a, &comp_a); + status = cal_client_get_object (client, a, &icalcomp_a); if (status != CAL_CLIENT_GET_SUCCESS) return -1; - status = cal_client_get_object (client, b, &comp_b); + status = cal_client_get_object (client, b, &icalcomp_b); if (status != CAL_CLIENT_GET_SUCCESS) return 1; + comp_a = cal_component_new (); + cal_component_set_icalcomponent (comp_a, icalcomp_a); + comp_b = cal_component_new (); + cal_component_set_icalcomponent (comp_b, icalcomp_b); + cal_component_get_priority (comp_a, &pri_a); cal_component_get_priority (comp_b, &pri_b); @@ -194,6 +200,9 @@ sort_uids (gconstpointer a, if (pri_b != &lowest) cal_component_free_priority (pri_b); + g_object_unref (comp_a); + g_object_unref (comp_b); + return rv; } @@ -211,6 +220,7 @@ get_todays_uids (ESummary *summary, for (p = uids; p; p = p->next) { char *uid; + icalcomponent *icalcomp; CalComponent *comp; CalClientGetStatus status; CalComponentDateTime due; @@ -218,11 +228,14 @@ get_todays_uids (ESummary *summary, time_t endt; uid = p->data; - status = cal_client_get_object (client, uid, &comp); + status = cal_client_get_object (client, uid, &icalcomp); if (status != CAL_CLIENT_GET_SUCCESS) { continue; } + comp = cal_component_new (); + cal_component_set_icalcomponent (comp, icalcomp); + cal_component_get_due (comp, &due); cal_client_get_timezone (client, due.tzid, &zone); @@ -236,6 +249,7 @@ get_todays_uids (ESummary *summary, } cal_component_free_datetime (&due); + g_object_unref (comp); } if (today == NULL) { @@ -251,6 +265,7 @@ get_task_colour (ESummary *summary, CalClient *client, const char *uid) { + icalcomponent *icalcomp; CalComponent *comp; CalClientGetStatus status; CalComponentDateTime due; @@ -262,11 +277,14 @@ get_task_colour (ESummary *summary, todays_start = time_day_begin_with_zone (t, summary->tz); todays_end = time_day_end_with_zone (t, summary->tz); - status = cal_client_get_object (client, uid, &comp); + status = cal_client_get_object (client, uid, &icalcomp); if (status != CAL_CLIENT_GET_SUCCESS) { return "black"; } + comp = cal_component_new (); + cal_component_set_icalcomponent (comp, icalcomp); + cal_component_get_due (comp, &due); cal_client_get_timezone (client, due.tzid, &zone); @@ -286,6 +304,7 @@ get_task_colour (ESummary *summary, } cal_component_free_datetime (&due); + g_object_unref (comp); return (const char *)ret; } @@ -340,6 +359,7 @@ generate_html (gpointer data) for (l = uids; l; l = l->next) { char *uid; + icalcomponent *icalcomp; CalComponent *comp; CalComponentText text; CalClientGetStatus status; @@ -347,11 +367,14 @@ generate_html (gpointer data) const char *colour; uid = l->data; - status = cal_client_get_object (tasks->client, uid, &comp); + status = cal_client_get_object (tasks->client, uid, &icalcomp); if (status != CAL_CLIENT_GET_SUCCESS) { continue; } + comp = cal_component_new (); + cal_component_set_icalcomponent (comp, icalcomp); + cal_component_get_summary (comp, &text); cal_component_get_completed (comp, &completed); |