manager: pass ECalObjModType to update and remove
Currently, GcalManager always assumes E_CAL_OBJ_MOD_THIS when modifying or deleting events. Since we're landing the groundwork for recurrence management, we can't assume this anymore. This patch, then, allows GcalManager:modify_event() and :remove_event() receive the ECalObjModType instead of assuming E_CAL_OBJ_MOD_THIS. However, this commit does not add recurrence support yet, and every call to these functions are still passing E_CAL_OBJ_MOD_THIS. https://bugzilla.gnome.org/show_bug.cgi?id=782755
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
a53581ed53
commit
9ffa913ad4
+10
-6
@@ -1748,12 +1748,14 @@ gcal_manager_create_event (GcalManager *manager,
|
||||
* gcal_manager_update_event:
|
||||
* @manager: a #GcalManager
|
||||
* @event: a #GcalEvent
|
||||
* @mod: an #ECalObjModType
|
||||
*
|
||||
* Saves all changes made to @event persistently.
|
||||
*/
|
||||
void
|
||||
gcal_manager_update_event (GcalManager *manager,
|
||||
GcalEvent *event)
|
||||
gcal_manager_update_event (GcalManager *manager,
|
||||
GcalEvent *event,
|
||||
ECalObjModType mod)
|
||||
{
|
||||
GcalManagerUnit *unit;
|
||||
ECalComponent *component;
|
||||
@@ -1775,7 +1777,7 @@ gcal_manager_update_event (GcalManager *manager,
|
||||
|
||||
e_cal_client_modify_object (unit->client,
|
||||
e_cal_component_get_icalcomponent (component),
|
||||
E_CAL_OBJ_MOD_THIS,
|
||||
mod,
|
||||
NULL,
|
||||
on_event_updated,
|
||||
component);
|
||||
@@ -1787,12 +1789,14 @@ gcal_manager_update_event (GcalManager *manager,
|
||||
* gcal_manager_remove_event:
|
||||
* @manager: a #GcalManager
|
||||
* @event: a #GcalEvent
|
||||
* @mod: an #ECalObjModType
|
||||
*
|
||||
* Deletes @event.
|
||||
*/
|
||||
void
|
||||
gcal_manager_remove_event (GcalManager *manager,
|
||||
GcalEvent *event)
|
||||
gcal_manager_remove_event (GcalManager *manager,
|
||||
GcalEvent *event,
|
||||
ECalObjModType mod)
|
||||
{
|
||||
GcalManagerUnit *unit;
|
||||
ECalComponentId *id;
|
||||
@@ -1817,7 +1821,7 @@ gcal_manager_remove_event (GcalManager *manager,
|
||||
e_cal_client_remove_object (unit->client,
|
||||
id->uid,
|
||||
id->rid,
|
||||
E_CAL_OBJ_MOD_THIS,
|
||||
mod,
|
||||
manager->async_ops,
|
||||
on_event_removed,
|
||||
component);
|
||||
|
||||
Reference in New Issue
Block a user