From 6823de81f37ab21ba2a9627ed09ecc52425ba1e0 Mon Sep 17 00:00:00 2001 From: Philip Van Hoof Date: Tue, 4 Jan 2005 11:52:21 +0000 Subject: Use standard error messages 2005-01-04 Philip Van Hoof * csv-format.c, rdf-format.c: Use standard error messages svn path=/trunk/; revision=28233 --- plugins/save-calendar/csv-format.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'plugins/save-calendar/csv-format.c') diff --git a/plugins/save-calendar/csv-format.c b/plugins/save-calendar/csv-format.c index 06124f1bd9..80a32d2386 100644 --- a/plugins/save-calendar/csv-format.c +++ b/plugins/save-calendar/csv-format.c @@ -40,6 +40,8 @@ #include #include +#include "widgets/misc/e-error.h" + #include "format-handler.h" typedef struct _CsvConfig CsvConfig; @@ -349,23 +351,9 @@ do_save_calendar_csv (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource uri = gnome_vfs_uri_new (dest_uri); result = gnome_vfs_open_uri (&handle, uri, GNOME_VFS_OPEN_READ); - if (result == GNOME_VFS_OK) { - GtkWidget *warning = - gtk_message_dialog_new_with_markup (NULL, - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_WARNING, - GTK_BUTTONS_NONE, - _("File exists \"%s\".\n" - "Do you wish to overwrite it?"), dest_uri); - - gtk_dialog_add_button (GTK_DIALOG (warning), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); - gtk_dialog_add_button (GTK_DIALOG (warning), _("_Overwrite"), GTK_RESPONSE_YES); - - doit = FALSE; - if (gtk_dialog_run (GTK_DIALOG (warning)) == GTK_RESPONSE_YES) - doit = TRUE; - gtk_widget_destroy (warning); - } + if (result == GNOME_VFS_OK) + doit = e_error_run(gtk_widget_get_toplevel (GTK_WIDGET (target->selector)), + E_ERROR_ASK_FILE_EXISTS_OVERWRITE, dest_uri, NULL) == GTK_RESPONSE_OK; if (doit) { result = gnome_vfs_open_uri (&handle, uri, GNOME_VFS_OPEN_WRITE); -- cgit v1.2.3