edit-dialog: implements GCAL_RESPONSE_SAVE_EVENT

This patch mainly implements GCAL_RESPONSE_SAVE_EVENT. It updates the event correctly, no matter in which source it is.

Signed-off-by: Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
This commit is contained in:
Georges Basile Stavracas Neto
2014-12-04 17:10:49 -05:00
committed by Erick Pérez Castellanos
parent 5a1f12ad00
commit 56e69f7c88
5 changed files with 95 additions and 2 deletions
+14 -1
View File
@@ -757,6 +757,7 @@ edit_dialog_closed (GtkDialog *dialog,
GcalWindowPrivate *priv;
GcalEditDialog *edit_dialog;
ECalComponent *component;
GcalView *view;
priv = gcal_window_get_instance_private (GCAL_WINDOW (user_data));
@@ -766,9 +767,18 @@ edit_dialog_closed (GtkDialog *dialog,
view = GCAL_VIEW (priv->views[priv->active_view]);
edit_dialog = GCAL_EDIT_DIALOG (dialog);
/* FIXME: add back cancel and accept responses */
switch (response)
{
case GCAL_RESPONSE_SAVE_EVENT:
/* retrieve the component from the dialog*/
component = gcal_edit_dialog_get_component (edit_dialog);
gcal_manager_update_event (priv->manager,
gcal_edit_dialog_get_source (edit_dialog),
component);
break;
case GCAL_RESPONSE_DELETE_EVENT:
/* delete the event */
if (priv->notification != NULL)
@@ -786,6 +796,9 @@ edit_dialog_closed (GtkDialog *dialog,
break;
case GTK_RESPONSE_CANCEL:
break;
}
}