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:
Yash Singh
2017-05-27 11:36:05 -03:00
committed by Georges Basile Stavracas Neto
parent a53581ed53
commit 9ffa913ad4
8 changed files with 23 additions and 17 deletions
+4 -4
View File
@@ -1102,13 +1102,13 @@ edit_dialog_closed (GtkDialog *dialog,
break;
case GCAL_RESPONSE_SAVE_EVENT:
gcal_manager_update_event (window->manager, event);
gcal_manager_update_event (window->manager, event, E_CAL_OBJ_MOD_THIS);
break;
case GCAL_RESPONSE_DELETE_EVENT:
if (window->event_to_delete != NULL)
{
gcal_manager_remove_event (window->manager, window->event_to_delete);
gcal_manager_remove_event (window->manager, window->event_to_delete, E_CAL_OBJ_MOD_THIS);
g_clear_object (&window->event_to_delete);
create_notification (GCAL_WINDOW (user_data), _("Another event deleted"), _("Undo"));
@@ -1209,7 +1209,7 @@ remove_event (GtkWidget *notification,
if (window->event_to_delete != NULL)
{
gcal_manager_remove_event (window->manager, window->event_to_delete);
gcal_manager_remove_event (window->manager, window->event_to_delete, E_CAL_OBJ_MOD_THIS);
g_clear_object (&window->event_to_delete);
}
}
@@ -1282,7 +1282,7 @@ gcal_window_finalize (GObject *object)
/* If we have a queued event to delete, remove it now */
if (window->event_to_delete)
{
gcal_manager_remove_event (window->manager, window->event_to_delete);
gcal_manager_remove_event (window->manager, window->event_to_delete, E_CAL_OBJ_MOD_THIS);
g_clear_object (&window->event_to_delete);
}