manager: pass correct rid & uid to remove-event
Passing the correct rid & uid to e_cal_client_remove_object() ensures that the deletion of recurrent events is handled correctly. https://bugzilla.gnome.org/show_bug.cgi?id=782755
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
7fd3e48427
commit
6b31ac88c2
+11
-5
@@ -1801,8 +1801,9 @@ gcal_manager_remove_event (GcalManager *manager,
|
|||||||
ECalObjModType mod)
|
ECalObjModType mod)
|
||||||
{
|
{
|
||||||
GcalManagerUnit *unit;
|
GcalManagerUnit *unit;
|
||||||
ECalComponentId *id;
|
|
||||||
ECalComponent *component;
|
ECalComponent *component;
|
||||||
|
gchar* rid;
|
||||||
|
gchar* uid;
|
||||||
|
|
||||||
GCAL_ENTRY;
|
GCAL_ENTRY;
|
||||||
|
|
||||||
@@ -1811,7 +1812,12 @@ gcal_manager_remove_event (GcalManager *manager,
|
|||||||
|
|
||||||
component = gcal_event_get_component (event);
|
component = gcal_event_get_component (event);
|
||||||
unit = g_hash_table_lookup (manager->clients, gcal_event_get_source (event));
|
unit = g_hash_table_lookup (manager->clients, gcal_event_get_source (event));
|
||||||
id = e_cal_component_get_id (component);
|
rid = NULL;
|
||||||
|
|
||||||
|
e_cal_component_get_uid (component, &uid);
|
||||||
|
|
||||||
|
if (gcal_event_has_recurrence (event))
|
||||||
|
rid = e_cal_component_get_recurid_as_string (component);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* While we're removing the event, we don't want the component
|
* While we're removing the event, we don't want the component
|
||||||
@@ -1821,14 +1827,14 @@ gcal_manager_remove_event (GcalManager *manager,
|
|||||||
g_object_ref (component);
|
g_object_ref (component);
|
||||||
|
|
||||||
e_cal_client_remove_object (unit->client,
|
e_cal_client_remove_object (unit->client,
|
||||||
id->uid,
|
uid,
|
||||||
id->rid,
|
rid,
|
||||||
mod,
|
mod,
|
||||||
manager->async_ops,
|
manager->async_ops,
|
||||||
on_event_removed,
|
on_event_removed,
|
||||||
component);
|
component);
|
||||||
|
|
||||||
e_cal_component_free_id (id);
|
g_free (rid);
|
||||||
|
|
||||||
GCAL_EXIT;
|
GCAL_EXIT;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user