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:
committed by
Erick Pérez Castellanos
parent
5a1f12ad00
commit
56e69f7c88
+14
-1
@@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user