From 687582285fd4b7a2752fc451b7c500974cd50f41 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Sun, 21 Jan 2001 19:06:54 +0000 Subject: Fix bug #1250; now we present a confirmation dialog before deleting the 2001-01-21 Federico Mena Quintero * gui/dialogs/task-editor.c (file_delete_cb): Fix bug #1250; now we present a confirmation dialog before deleting the component. svn path=/trunk/; revision=7684 --- calendar/gui/dialogs/task-editor.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'calendar/gui/dialogs/task-editor.c') diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c index 571f9917ef..74849a66d4 100644 --- a/calendar/gui/dialogs/task-editor.c +++ b/calendar/gui/dialogs/task-editor.c @@ -37,6 +37,7 @@ #include #include #include +#include "delete-comp.h" #include "task-editor.h" #include "../calendar-config.h" #include "../widget-util.h" @@ -1052,7 +1053,6 @@ file_delete_cb (BonoboUIComponent *uic, gpointer data, const char *path) { TaskEditor *tedit; TaskEditorPrivate *priv; - const char *uid; tedit = TASK_EDITOR (data); @@ -1062,14 +1062,18 @@ file_delete_cb (BonoboUIComponent *uic, gpointer data, const char *path) g_return_if_fail (priv->comp); - cal_component_get_uid (priv->comp, &uid); + if (delete_component_dialog (priv->comp, priv->app)) { + const char *uid; - /* We don't check the return value; FALSE can mean the object was not in - * the server anyways. - */ - cal_client_remove_object (priv->client, uid); + cal_component_get_uid (priv->comp, &uid); - close_dialog (tedit); + /* We don't check the return value; FALSE can mean the object + * was not in the server anyways. + */ + cal_client_remove_object (priv->client, uid); + + close_dialog (tedit); + } } /* File/Close callback */ -- cgit