aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution/e-summary-tasks.c
diff options
context:
space:
mode:
Diffstat (limited to 'my-evolution/e-summary-tasks.c')
-rw-r--r--my-evolution/e-summary-tasks.c33
1 files changed, 28 insertions, 5 deletions
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);