aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Van Hoof <pvanhoof@gnome.org>2005-01-04 19:52:21 +0800
committerPhilip Van Hoof <pvanhoof@src.gnome.org>2005-01-04 19:52:21 +0800
commit6823de81f37ab21ba2a9627ed09ecc52425ba1e0 (patch)
tree062b5bf2b73fe7737da5853aff1e44f5d578e64c
parent9f14e7a751586266c2970b7e601fd3c1662c6e0a (diff)
downloadgsoc2013-evolution-6823de81f37ab21ba2a9627ed09ecc52425ba1e0.tar
gsoc2013-evolution-6823de81f37ab21ba2a9627ed09ecc52425ba1e0.tar.gz
gsoc2013-evolution-6823de81f37ab21ba2a9627ed09ecc52425ba1e0.tar.bz2
gsoc2013-evolution-6823de81f37ab21ba2a9627ed09ecc52425ba1e0.tar.lz
gsoc2013-evolution-6823de81f37ab21ba2a9627ed09ecc52425ba1e0.tar.xz
gsoc2013-evolution-6823de81f37ab21ba2a9627ed09ecc52425ba1e0.tar.zst
gsoc2013-evolution-6823de81f37ab21ba2a9627ed09ecc52425ba1e0.zip
Use standard error messages
2005-01-04 Philip Van Hoof <pvanhoof@gnome.org> * csv-format.c, rdf-format.c: Use standard error messages svn path=/trunk/; revision=28233
-rw-r--r--plugins/save-calendar/ChangeLog4
-rw-r--r--plugins/save-calendar/csv-format.c22
-rw-r--r--plugins/save-calendar/rdf-format.c22
3 files changed, 14 insertions, 34 deletions
diff --git a/plugins/save-calendar/ChangeLog b/plugins/save-calendar/ChangeLog
index a8ee1d64a4..a14aacba12 100644
--- a/plugins/save-calendar/ChangeLog
+++ b/plugins/save-calendar/ChangeLog
@@ -1,3 +1,7 @@
+2005-01-04 Philip Van Hoof <pvanhoof@gnome.org>
+
+ * csv-format.c, rdf-format.c: Use standard error messages
+
2004-12-27 Philip Van Hoof <pvanhoof@gnome.org>
* csv-format.c, rdf-format.c: Warning when overwriting file
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 <libgnomevfs/gnome-vfs.h>
#include <string.h>
+#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);
diff --git a/plugins/save-calendar/rdf-format.c b/plugins/save-calendar/rdf-format.c
index bcacd1f373..eb8154f782 100644
--- a/plugins/save-calendar/rdf-format.c
+++ b/plugins/save-calendar/rdf-format.c
@@ -45,6 +45,8 @@
#include <libxml/xpath.h>
#include <string.h>
+#include "widgets/misc/e-error.h"
+
#include "format-handler.h"
static void
@@ -214,23 +216,9 @@ do_save_calendar_rdf (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,
- _("<b>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);