aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-model-tasks.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-06-14 14:54:20 +0800
committerMilan Crha <mcrha@redhat.com>2011-06-14 14:54:20 +0800
commit38790d8478e906a5c59d0c4a5216f297f305bfeb (patch)
tree0f9a96db2765901f2a27b68c84815a491214ecc1 /calendar/gui/e-cal-model-tasks.c
parent08af0d1f81a4e983bb49d8fb8fe74e670adbb8f6 (diff)
downloadgsoc2013-evolution-38790d8478e906a5c59d0c4a5216f297f305bfeb.tar
gsoc2013-evolution-38790d8478e906a5c59d0c4a5216f297f305bfeb.tar.gz
gsoc2013-evolution-38790d8478e906a5c59d0c4a5216f297f305bfeb.tar.bz2
gsoc2013-evolution-38790d8478e906a5c59d0c4a5216f297f305bfeb.tar.lz
gsoc2013-evolution-38790d8478e906a5c59d0c4a5216f297f305bfeb.tar.xz
gsoc2013-evolution-38790d8478e906a5c59d0c4a5216f297f305bfeb.tar.zst
gsoc2013-evolution-38790d8478e906a5c59d0c4a5216f297f305bfeb.zip
Do not use deprecated EBook/ECal API
Diffstat (limited to 'calendar/gui/e-cal-model-tasks.c')
-rw-r--r--calendar/gui/e-cal-model-tasks.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/calendar/gui/e-cal-model-tasks.c b/calendar/gui/e-cal-model-tasks.c
index ff829e319f..51811c783f 100644
--- a/calendar/gui/e-cal-model-tasks.c
+++ b/calendar/gui/e-cal-model-tasks.c
@@ -325,7 +325,7 @@ get_completed (ECalModelComponent *comp_data)
comp_data->completed->tt = tt_completed;
if (icaltime_get_tzid (tt_completed)
- && e_cal_get_timezone (comp_data->client, icaltime_get_tzid (tt_completed), &zone, NULL))
+ && e_cal_client_get_timezone_sync (comp_data->client, icaltime_get_tzid (tt_completed), &zone, NULL, NULL))
comp_data->completed->zone = zone;
else
comp_data->completed->zone = NULL;
@@ -355,7 +355,7 @@ get_due (ECalModelComponent *comp_data)
comp_data->due->tt = tt_due;
if (icaltime_get_tzid (tt_due)
- && e_cal_get_timezone (comp_data->client, icaltime_get_tzid (tt_due), &zone, NULL))
+ && e_cal_client_get_timezone_sync (comp_data->client, icaltime_get_tzid (tt_due), &zone, NULL, NULL))
comp_data->due->zone = zone;
else
comp_data->due->zone = NULL;
@@ -525,7 +525,7 @@ get_due_status (ECalModelTasks *model, ECalModelComponent *comp_data)
/* Get the current time in the same timezone as the DUE date.*/
tzid = icalparameter_get_tzid (param);
- if (!e_cal_get_timezone (comp_data->client, tzid, &zone, NULL))
+ if (!e_cal_client_get_timezone_sync (comp_data->client, tzid, &zone, NULL, NULL))
return E_CAL_MODEL_TASKS_DUE_FUTURE;
now_tt = icaltime_current_time_with_zone (zone);
@@ -1252,13 +1252,17 @@ void e_cal_model_tasks_mark_comp_incomplete (ECalModelTasks *model, ECalModelCom
static void
commit_component_changes (ECalModelComponent *comp_data)
{
+ GError *error = NULL;
+
g_return_if_fail (comp_data != NULL);
/* FIXME ask about mod type */
- if (!e_cal_modify_object (comp_data->client, comp_data->icalcomp, CALOBJ_MOD_ALL, NULL)) {
- g_warning (G_STRLOC ": Could not modify the object!");
+ if (!e_cal_client_modify_object_sync (comp_data->client, comp_data->icalcomp, CALOBJ_MOD_ALL, NULL, &error)) {
+ g_warning (G_STRLOC ": Could not modify the object! %s", error ? error->message : "Unknown error");
/* FIXME Show error dialog */
+ if (error)
+ g_error_free (error);
}
}