2993373
diff --git a/plugins/eds/gtd-eds-autoptr.h b/plugins/eds/gtd-eds-autoptr.h
2993373
index eb9b011..78bd944 100644
2993373
--- a/plugins/eds/gtd-eds-autoptr.h
2993373
+++ b/plugins/eds/gtd-eds-autoptr.h
2993373
@@ -23,6 +23,5 @@
2993373
 #include <libecal/libecal.h>
2993373
 
2993373
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (ECalComponent, g_object_unref);
2993373
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ECalComponentId, e_cal_component_free_id);
2993373
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ECalComponentId, e_cal_component_id_free);
2993373
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (ECalClient, g_object_unref);
2993373
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ESource, g_object_unref);
2993373
diff --git a/plugins/eds/gtd-provider-eds.c b/plugins/eds/gtd-provider-eds.c
2993373
index a403226..def4235 100644
2993373
--- a/plugins/eds/gtd-provider-eds.c
2993373
+++ b/plugins/eds/gtd-provider-eds.c
2993373
@@ -554,6 +554,7 @@ gtd_provider_eds_create_task (GtdProvider *provider,
2993373
 
2993373
   e_cal_client_create_object (client,
2993373
                               e_cal_component_get_icalcomponent (component),
2993373
+                              E_CAL_OPERATION_FLAG_NONE,
2993373
                               NULL,
2993373
                               (GAsyncReadyCallback) on_task_created_cb,
2993373
                               new_task);
2993373
@@ -587,6 +588,7 @@ gtd_provider_eds_update_task (GtdProvider *provider,
2993373
   e_cal_client_modify_object (client,
2993373
                               e_cal_component_get_icalcomponent (component),
2993373
                               E_CAL_OBJ_MOD_THIS,
2993373
+                              E_CAL_OPERATION_FLAG_NONE,
2993373
                               NULL,
2993373
                               (GAsyncReadyCallback) on_task_modified_cb,
2993373
                               task);
2993373
@@ -616,9 +618,10 @@ gtd_provider_eds_remove_task (GtdProvider *provider,
2993373
   gtd_object_push_loading (GTD_OBJECT (provider));
2993373
 
2993373
   e_cal_client_remove_object (client,
2993373
-                              id->uid,
2993373
-                              id->rid,
2993373
+                              e_cal_component_id_get_uid (id),
2993373
+                              e_cal_component_id_get_rid (id),
2993373
                               E_CAL_OBJ_MOD_THIS,
2993373
+                              E_CAL_OPERATION_FLAG_NONE,
2993373
                               NULL,
2993373
                               (GAsyncReadyCallback) on_task_removed_cb,
2993373
                               provider);
2993373
diff --git a/plugins/eds/gtd-task-eds.c b/plugins/eds/gtd-task-eds.c
2993373
index 2c8cd8e..bd8f7ac 100644
2993373
--- a/plugins/eds/gtd-task-eds.c
2993373
+++ b/plugins/eds/gtd-task-eds.c
2993373
@@ -46,19 +46,19 @@ static GParamSpec *properties [N_PROPS];
2993373
  */
2993373
 
2993373
 static GDateTime*
2993373
-convert_icaltime (const icaltimetype *date)
2993373
+convert_icaltime (const ICalTime *date)
2993373
 {
2993373
   GDateTime *dt;
2993373
 
2993373
   if (!date)
2993373
     return NULL;
2993373
 
2993373
-  dt = g_date_time_new_utc (date->year,
2993373
-                            date->month,
2993373
-                            date->day,
2993373
-                            date->is_date ? 0 : date->hour,
2993373
-                            date->is_date ? 0 : date->minute,
2993373
-                            date->is_date ? 0 : date->second);
2993373
+  dt = g_date_time_new_utc (i_cal_time_get_year (date),
2993373
+                            i_cal_time_get_month (date),
2993373
+                            i_cal_time_get_day (date),
2993373
+                            i_cal_time_is_date (date) ? 0 : i_cal_time_get_hour (date),
2993373
+                            i_cal_time_is_date (date) ? 0 : i_cal_time_get_minute (date),
2993373
+                            i_cal_time_is_date (date) ? 0 : i_cal_time_get_second (date));
2993373
 
2993373
   return dt;
2993373
 }
2993373
@@ -67,19 +67,20 @@ static void
2993373
 set_description (GtdTaskEds  *self,
2993373
                  const gchar *description)
2993373
 {
2993373
-  ECalComponentText text;
2993373
+  ECalComponentText *text;
2993373
   GSList note;
2993373
 
2993373
-  text.value = description && *description ? description : "";
2993373
-  text.altrep = NULL;
2993373
+  text = e_cal_component_text_new (description ? description : "", NULL);
2993373
 
2993373
-  note.data = &tex;;
2993373
+  note.data = text;
2993373
   note.next = NULL;
2993373
 
2993373
   g_clear_pointer (&self->description, g_free);
2993373
   self->description = g_strdup (description);
2993373
 
2993373
-  e_cal_component_set_description_list (self->component, ¬e;;
2993373
+  e_cal_component_set_descriptions (self->component, (description && *description) ? &note : NULL);
2993373
+
2993373
+  e_cal_component_text_free (text);
2993373
 }
2993373
 
2993373
 static void
2993373
@@ -90,7 +91,7 @@ setup_description (GtdTaskEds *self)
2993373
   GSList *l;
2993373
 
2993373
   /* concatenates the multiple descriptions a task may have */
2993373
-  e_cal_component_get_description_list (self->component, &text_list);
2993373
+  text_list = e_cal_component_get_descriptions (self->component);
2993373
 
2993373
   for (l = text_list; l != NULL; l = l->next)
2993373
     {
2993373
@@ -105,21 +106,21 @@ setup_description (GtdTaskEds *self)
2993373
             {
2993373
               carrier = g_strconcat (desc,
2993373
                                      "\n",
2993373
-                                     text->value,
2993373
+                                     e_cal_component_text_get_value (text),
2993373
                                      NULL);
2993373
               g_free (desc);
2993373
               desc = carrier;
2993373
             }
2993373
           else
2993373
             {
2993373
-              desc = g_strdup (text->value);
2993373
+              desc = g_strdup (e_cal_component_text_get_value (text));
2993373
             }
2993373
         }
2993373
     }
2993373
 
2993373
   set_description (self, desc);
2993373
 
2993373
-  e_cal_component_free_text_list (text_list);
2993373
+  g_slist_free_full (text_list, e_cal_component_text_free);
2993373
 }
2993373
 
2993373
 
2993373
@@ -138,7 +139,7 @@ gtd_task_eds_get_uid (GtdObject *object)
2993373
   self = GTD_TASK_EDS (object);
2993373
 
2993373
   if (self->component)
2993373
-    e_cal_component_get_uid (self->component, &uid);
2993373
+    uid = e_cal_component_get_uid (self->component);
2993373
   else
2993373
     uid = NULL;
2993373
 
2993373
@@ -159,7 +160,7 @@ gtd_task_eds_set_uid (GtdObject   *object,
2993373
   if (!self->component)
2993373
     return;
2993373
 
2993373
-  e_cal_component_get_uid (self->component, &current_uid);
2993373
+  current_uid = e_cal_component_get_uid (self->component);
2993373
 
2993373
   if (g_strcmp0 (current_uid, uid) != 0)
2993373
     {
2993373
@@ -177,7 +178,7 @@ gtd_task_eds_set_uid (GtdObject   *object,
2993373
 static gboolean
2993373
 gtd_task_eds_get_complete (GtdTask *task)
2993373
 {
2993373
-  icalproperty_status status;
2993373
+  ICalPropertyStatus status;
2993373
   GtdTaskEds *self;
2993373
   gboolean completed;
2993373
 
2993373
@@ -185,8 +186,8 @@ gtd_task_eds_get_complete (GtdTask *task)
2993373
 
2993373
   self = GTD_TASK_EDS (task);
2993373
 
2993373
-  e_cal_component_get_status (self->component, &status);
2993373
-  completed = status == ICAL_STATUS_COMPLETED;
2993373
+  status = e_cal_component_get_status (self->component);
2993373
+  completed = status == I_CAL_STATUS_COMPLETED;
2993373
 
2993373
   return completed;
2993373
 }
2993373
@@ -195,8 +196,8 @@ static void
2993373
 gtd_task_eds_set_complete (GtdTask  *task,
2993373
                            gboolean  complete)
2993373
 {
2993373
-  icalproperty_status status;
2993373
-  icaltimetype *dt;
2993373
+  ICalPropertyStatus status;
2993373
+  ICalTime *dt;
2993373
   GtdTaskEds *self;
2993373
   gint percent;
2993373
 
2993373
@@ -209,54 +210,54 @@ gtd_task_eds_set_complete (GtdTask  *task,
2993373
       percent = 100;
2993373
       status = ICAL_STATUS_COMPLETED;
2993373
 
2993373
-      dt = g_new0 (icaltimetype, 1);
2993373
-      dt->year = g_date_time_get_year (now);
2993373
-      dt->month = g_date_time_get_month (now);
2993373
-      dt->day = g_date_time_get_day_of_month (now);
2993373
-      dt->hour = g_date_time_get_hour (now);
2993373
-      dt->minute = g_date_time_get_minute (now);
2993373
-      dt->second = g_date_time_get_seconds (now);
2993373
-      dt->zone = icaltimezone_get_utc_timezone ();
2993373
+      dt = i_cal_time_new_null_time ();
2993373
+      i_cal_time_set_date (dt,
2993373
+                           g_date_time_get_year (now),
2993373
+                           g_date_time_get_month (now),
2993373
+                           g_date_time_get_day_of_month (now));
2993373
+      i_cal_time_set_time (dt,
2993373
+                           g_date_time_get_hour (now),
2993373
+                           g_date_time_get_minute (now),
2993373
+                           g_date_time_get_seconds (now));
2993373
+      i_cal_time_set_timezone (dt, i_cal_timezone_get_utc_timezone ());
2993373
 
2993373
       /* convert timezone
2993373
        *
2993373
        * FIXME: This does not do anything until we have an ical
2993373
        * timezone associated with the task
2993373
        */
2993373
-      icaltimezone_convert_time (dt, NULL, icaltimezone_get_utc_timezone ());
2993373
+      i_cal_time_convert_timezone (dt, NULL, i_cal_timezone_get_utc_timezone ());
2993373
     }
2993373
   else
2993373
     {
2993373
       dt = NULL;
2993373
       percent = 0;
2993373
-      status = ICAL_STATUS_NEEDSACTION;
2993373
+      status = I_CAL_STATUS_NEEDSACTION;
2993373
     }
2993373
 
2993373
-  e_cal_component_set_percent_as_int (self->component, percent);
2993373
+  e_cal_component_set_percent_complete (self->component, percent);
2993373
   e_cal_component_set_status (self->component, status);
2993373
   e_cal_component_set_completed (self->component, dt);
2993373
 
2993373
-  if (dt)
2993373
-    e_cal_component_free_icaltimetype (dt);
2993373
+  g_clear_object (&dt);
2993373
 }
2993373
 
2993373
 static GDateTime*
2993373
 gtd_task_eds_get_creation_date (GtdTask *task)
2993373
 {
2993373
-  icaltimetype *idt;
2993373
+  ICalTime *idt;
2993373
   GtdTaskEds *self;
2993373
   GDateTime *dt;
2993373
 
2993373
   self = GTD_TASK_EDS (task);
2993373
-  idt = NULL;
2993373
   dt = NULL;
2993373
 
2993373
-  e_cal_component_get_created (self->component, &idt);
2993373
+  idt = e_cal_component_get_created (self->component);
2993373
 
2993373
   if (idt)
2993373
     dt = convert_icaltime (idt);
2993373
 
2993373
-  g_clear_pointer (&idt, e_cal_component_free_icaltimetype);
2993373
+  g_clear_object (&idt);
2993373
 
2993373
   return dt;
2993373
 }
2993373
@@ -286,7 +287,7 @@ gtd_task_eds_set_description (GtdTask     *task,
2993373
 static GDateTime*
2993373
 gtd_task_eds_get_due_date (GtdTask *task)
2993373
 {
2993373
-  ECalComponentDateTime comp_dt;
2993373
+  ECalComponentDateTime *comp_dt;
2993373
   GtdTaskEds *self;
2993373
   GDateTime *date;
2993373
 
2993373
@@ -294,10 +295,12 @@ gtd_task_eds_get_due_date (GtdTask *task)
2993373
 
2993373
   self = GTD_TASK_EDS (task);
2993373
 
2993373
-  e_cal_component_get_due (self->component, &comp_dt);
2993373
+  comp_dt = e_cal_component_get_due (self->component);
2993373
+  if (!comp_dt)
2993373
+    return NULL;
2993373
 
2993373
-  date = convert_icaltime (comp_dt.value);
2993373
-  e_cal_component_free_datetime (&comp_dt);
2993373
+  date = convert_icaltime (e_cal_component_datetime_get_value (comp_dt));
2993373
+  e_cal_component_datetime_free (comp_dt);
2993373
 
2993373
   return date;
2993373
 }
2993373
@@ -317,11 +320,10 @@ gtd_task_eds_set_due_date (GtdTask   *task,
2993373
 
2993373
   if (dt != current_dt)
2993373
     {
2993373
-      ECalComponentDateTime comp_dt;
2993373
-      icaltimetype *idt;
2993373
+      ECalComponentDateTime *comp_dt;
2993373
+      ICalTime *idt;
2993373
 
2993373
-      comp_dt.value = NULL;
2993373
-      comp_dt.tzid = NULL;
2993373
+      comp_dt = NULL;
2993373
       idt = NULL;
2993373
 
2993373
       if (!current_dt ||
2993373
@@ -329,36 +331,34 @@ gtd_task_eds_set_due_date (GtdTask   *task,
2993373
            dt &&
2993373
            g_date_time_compare (current_dt, dt) != 0))
2993373
         {
2993373
-          idt = g_new0 (icaltimetype, 1);
2993373
+          idt = i_cal_time_new_null_time ();
2993373
 
2993373
           g_date_time_ref (dt);
2993373
 
2993373
           /* Copy the given dt */
2993373
-          idt->year = g_date_time_get_year (dt);
2993373
-          idt->month = g_date_time_get_month (dt);
2993373
-          idt->day = g_date_time_get_day_of_month (dt);
2993373
-          idt->hour = g_date_time_get_hour (dt);
2993373
-          idt->minute = g_date_time_get_minute (dt);
2993373
-          idt->second = g_date_time_get_seconds (dt);
2993373
-          idt->is_date = (idt->hour == 0 &&
2993373
-                          idt->minute == 0 &&
2993373
-                          idt->second == 0);
2993373
-
2993373
-          comp_dt.tzid = g_strdup ("UTC");
2993373
+          i_cal_time_set_date (idt,
2993373
+                               g_date_time_get_year (dt),
2993373
+                               g_date_time_get_month (dt),
2993373
+                               g_date_time_get_day_of_month (dt));
2993373
+          i_cal_time_set_time (idt,
2993373
+                               g_date_time_get_hour (dt),
2993373
+                               g_date_time_get_minute (dt),
2993373
+                               g_date_time_get_seconds (dt));
2993373
+          i_cal_time_set_is_date (idt,
2993373
+                          i_cal_time_get_hour (idt) == 0 &&
2993373
+                          i_cal_time_get_minute (idt) == 0 &&
2993373
+                          i_cal_time_get_second (idt) == 0);
2993373
 
2993373
-          comp_dt.value = idt;
2993373
+          comp_dt = e_cal_component_datetime_new_take (idt, g_strdup ("UTC"));
2993373
 
2993373
-          e_cal_component_set_due (self->component, &comp_dt);
2993373
+          e_cal_component_set_due (self->component, comp_dt);
2993373
 
2993373
-          e_cal_component_free_datetime (&comp_dt);
2993373
+          e_cal_component_datetime_free (comp_dt);
2993373
 
2993373
           g_date_time_unref (dt);
2993373
         }
2993373
       else if (!dt)
2993373
         {
2993373
-          idt = NULL;
2993373
-          comp_dt.tzid = NULL;
2993373
-
2993373
           e_cal_component_set_due (self->component, NULL);
2993373
         }
2993373
     }
2993373
@@ -369,19 +369,13 @@ gtd_task_eds_set_due_date (GtdTask   *task,
2993373
 static gint32
2993373
 gtd_task_eds_get_priority (GtdTask *task)
2993373
 {
2993373
-  g_autofree gint *priority = NULL;
2993373
   GtdTaskEds *self;
2993373
 
2993373
   g_assert (GTD_IS_TASK_EDS (task));
2993373
 
2993373
   self = GTD_TASK_EDS (task);
2993373
 
2993373
-  e_cal_component_get_priority (self->component, &priority);
2993373
-
2993373
-  if (!priority)
2993373
-    return -1;
2993373
-
2993373
-  return *priority;
2993373
+  return e_cal_component_get_priority (self->component);
2993373
 }
2993373
 
2993373
 static void
2993373
@@ -394,29 +388,26 @@ gtd_task_eds_set_priority (GtdTask *task,
2993373
 
2993373
   self = GTD_TASK_EDS (task);
2993373
 
2993373
-  e_cal_component_set_priority (self->component, &priority);
2993373
+  e_cal_component_set_priority (self->component, priority);
2993373
 }
2993373
 
2993373
 static const gchar*
2993373
 gtd_task_eds_get_title (GtdTask *task)
2993373
 {
2993373
-  ECalComponentText summary;
2993373
   GtdTaskEds *self;
2993373
 
2993373
   g_return_val_if_fail (GTD_IS_TASK_EDS (task), NULL);
2993373
 
2993373
   self = GTD_TASK_EDS (task);
2993373
 
2993373
-  e_cal_component_get_summary (self->component, &summary);
2993373
-
2993373
-  return summary.value;
2993373
+  return i_cal_component_get_summary (e_cal_component_get_icalcomponent (self->component));
2993373
 }
2993373
 
2993373
 static void
2993373
 gtd_task_eds_set_title (GtdTask     *task,
2993373
                         const gchar *title)
2993373
 {
2993373
-  ECalComponentText new_summary;
2993373
+  ECalComponentText *new_summary;
2993373
   GtdTaskEds *self;
2993373
 
2993373
   g_return_if_fail (GTD_IS_TASK_EDS (task));
2993373
@@ -424,10 +415,11 @@ gtd_task_eds_set_title (GtdTask     *task,
2993373
 
2993373
   self = GTD_TASK_EDS (task);
2993373
 
2993373
-  new_summary.value = title;
2993373
-  new_summary.altrep = NULL;
2993373
+  new_summary = e_cal_component_text_new (title, NULL);
2993373
 
2993373
-  e_cal_component_set_summary (self->component, &new_summary);
2993373
+  e_cal_component_set_summary (self->component, new_summary);
2993373
+
2993373
+  e_cal_component_text_free (new_summary);
2993373
 }
2993373
 
2993373
 
2993373
@@ -436,10 +428,10 @@ gtd_task_eds_subtask_added (GtdTask *task,
2993373
                             GtdTask *subtask)
2993373
 {
2993373
   g_autoptr (GList) subtasks = NULL;
2993373
-  ECalComponentId *id;
2993373
+  const gchar *uid;
2993373
   ECalComponent *comp;
2993373
-  icalcomponent *ical_comp;
2993373
-  icalproperty *property;
2993373
+  ICalComponent *ical_comp;
2993373
+  ICalProperty *property;
2993373
   GtdTaskEds *subtask_self;
2993373
   GtdTaskEds *self;
2993373
 
2993373
@@ -450,17 +442,17 @@ gtd_task_eds_subtask_added (GtdTask *task,
2993373
   /* Hook with parent's :subtask_added */
2993373
   GTD_TASK_CLASS (gtd_task_eds_parent_class)->subtask_added (task, subtask);
2993373
 
2993373
-  id = e_cal_component_get_id (self->component);
2993373
+  uid = e_cal_component_get_uid (self->component);
2993373
   comp = subtask_self->component;
2993373
   ical_comp = e_cal_component_get_icalcomponent (comp);
2993373
-  property = icalcomponent_get_first_property (ical_comp, ICAL_RELATEDTO_PROPERTY);
2993373
+  property = i_cal_component_get_first_property (ical_comp, I_CAL_RELATEDTO_PROPERTY);
2993373
 
2993373
   if (property)
2993373
-    icalproperty_set_relatedto (property, id->uid);
2993373
+    i_cal_property_set_relatedto (property, uid);
2993373
   else
2993373
-    icalcomponent_add_property (ical_comp, icalproperty_new_relatedto (id->uid));
2993373
+    i_cal_component_take_property (ical_comp, i_cal_property_new_relatedto (uid));
2993373
 
2993373
-  e_cal_component_free_id (id);
2993373
+  g_clear_object (&property);
2993373
 }
2993373
 
2993373
 static void
2993373
@@ -468,8 +460,8 @@ gtd_task_eds_subtask_removed (GtdTask *task,
2993373
                               GtdTask *subtask)
2993373
 {
2993373
   g_autoptr (GList) subtasks = NULL;
2993373
-  icalcomponent *ical_comp;
2993373
-  icalproperty *property;
2993373
+  ICalComponent *ical_comp;
2993373
+  ICalProperty *property;
2993373
   GtdTaskEds *subtask_self;
2993373
 
2993373
   subtask_self = GTD_TASK_EDS (subtask);
2993373
@@ -480,12 +472,13 @@ gtd_task_eds_subtask_removed (GtdTask *task,
2993373
 
2993373
   /* Remove the parent link from the subtask's component */
2993373
   ical_comp = e_cal_component_get_icalcomponent (subtask_self->component);
2993373
-  property = icalcomponent_get_first_property (ical_comp, ICAL_RELATEDTO_PROPERTY);
2993373
+  property = i_cal_component_get_first_property (ical_comp, I_CAL_RELATEDTO_PROPERTY);
2993373
 
2993373
   if (!property)
2993373
     return;
2993373
 
2993373
-  icalcomponent_remove_property (ical_comp, property);
2993373
+  i_cal_component_remove_property (ical_comp, property);
2993373
+  g_object_unref (property);
2993373
 }
2993373
 
2993373
 
2993373
diff --git a/plugins/eds/gtd-task-list-eds.c b/plugins/eds/gtd-task-list-eds.c
2993373
index eb48a73..5b71718 100644
2993373
--- a/plugins/eds/gtd-task-list-eds.c
2993373
+++ b/plugins/eds/gtd-task-list-eds.c
2993373
@@ -85,19 +85,19 @@ setup_parent_task (GtdTaskListEds *self,
2993373
                    GtdTask        *task)
2993373
 {
2993373
   ECalComponent *component;
2993373
-  icalcomponent *ical_comp;
2993373
-  icalproperty *property;
2993373
+  ICalComponent *ical_comp;
2993373
+  ICalProperty *property;
2993373
   GtdTask *parent_task;
2993373
   const gchar *parent_uid;
2993373
 
2993373
   component = gtd_task_eds_get_component (GTD_TASK_EDS (task));
2993373
   ical_comp = e_cal_component_get_icalcomponent (component);
2993373
-  property = icalcomponent_get_first_property (ical_comp, ICAL_RELATEDTO_PROPERTY);
2993373
+  property = i_cal_component_get_first_property (ical_comp, I_CAL_RELATEDTO_PROPERTY);
2993373
 
2993373
   if (!property)
2993373
     return;
2993373
 
2993373
-  parent_uid = icalproperty_get_relatedto (property);
2993373
+  parent_uid = i_cal_property_get_relatedto (property);
2993373
   parent_task = gtd_task_list_get_task_by_id (GTD_TASK_LIST (self), parent_uid);
2993373
 
2993373
   if (parent_task)
2993373
@@ -112,6 +112,8 @@ setup_parent_task (GtdTaskListEds *self,
2993373
 
2993373
       g_ptr_array_add (self->pending_subtasks, data);
2993373
     }
2993373
+
2993373
+  g_object_unref (property);
2993373
 }
2993373
 
2993373
 static void
2993373
@@ -161,8 +163,8 @@ on_view_objects_added_cb (ECalClientView *view,
2993373
       GtdTask *task;
2993373
       const gchar *uid;
2993373
 
2993373
-      component = e_cal_component_new_from_string (icalcomponent_as_ical_string (l->data));
2993373
-      e_cal_component_get_uid (component, &uid);
2993373
+      component = e_cal_component_new_from_icalcomponent (i_cal_component_clone (l->data));
2993373
+      uid = e_cal_component_get_uid (component);
2993373
 
2993373
       task = gtd_task_list_get_task_by_id (self, uid);
2993373
 
2993373
@@ -211,8 +213,8 @@ on_view_objects_modified_cb (ECalClientView *view,
2993373
       GtdTask *task;
2993373
       const gchar *uid;
2993373
 
2993373
-      component = e_cal_component_new_from_string (icalcomponent_as_ical_string (l->data));
2993373
-      e_cal_component_get_uid (component, &uid);
2993373
+      component = e_cal_component_new_from_icalcomponent (i_cal_component_clone (l->data));
2993373
+      uid = e_cal_component_get_uid (component);
2993373
 
2993373
       task = gtd_task_list_get_task_by_id (self, uid);
2993373
 
2993373
@@ -244,7 +246,7 @@ on_view_objects_removed_cb (ECalClientView *view,
2993373
       GtdTask *task;
2993373
 
2993373
       id = l->data;
2993373
-      task = gtd_task_list_get_task_by_id (self, id->uid);
2993373
+      task = gtd_task_list_get_task_by_id (self, e_cal_component_id_get_uid (id));
2993373
 
2993373
       if (!task)
2993373
         continue;
2993373
diff --git a/plugins/eds/meson.build b/plugins/eds/meson.build
2993373
index ea84426..b37f0c6 100644
2993373
--- a/plugins/eds/meson.build
2993373
+++ b/plugins/eds/meson.build
2993373
@@ -8,10 +8,9 @@ plugins_ldflags += ['-Wl,--undefined=gtd_plugin_eds_register_types']
2993373
 ################
2993373
 
2993373
 eds_plugin_deps = [
2993373
-  dependency('libecal-1.2', version: '>= 3.13.90'),
2993373
+  dependency('libecal-2.0', version: '>= 3.33.1'),
2993373
   dependency('libedataserver-1.2', version: '>= 3.17.1'),
2993373
   dependency('libedataserverui-1.2', version: '>= 3.17.1'),
2993373
-  dependency('libical', version: '>= 0.43'),
2993373
 ]
2993373
 
2993373
 eds_plugin_deps += gnome_todo_deps