diff options
author | Philip Van Hoof <pvanhoof@gnome.org> | 2005-01-04 19:51:59 +0800 |
---|---|---|
committer | Philip Van Hoof <pvanhoof@src.gnome.org> | 2005-01-04 19:51:59 +0800 |
commit | 9f14e7a751586266c2970b7e601fd3c1662c6e0a (patch) | |
tree | dbc6130d8c0208f5710240499967c6086ace5b34 | |
parent | 89ad7af7087312d4b0f1ae3652e7e1f64dc892d2 (diff) | |
download | gsoc2013-evolution-9f14e7a751586266c2970b7e601fd3c1662c6e0a.tar.gz gsoc2013-evolution-9f14e7a751586266c2970b7e601fd3c1662c6e0a.tar.zst gsoc2013-evolution-9f14e7a751586266c2970b7e601fd3c1662c6e0a.zip |
Use standard error messages
2005-01-04 Philip Van Hoof <pvanhoof@gnome.org>
* save-attachments.c: Use standard error messages
svn path=/trunk/; revision=28232
-rw-r--r-- | plugins/save-attachments/ChangeLog | 4 | ||||
-rw-r--r-- | plugins/save-attachments/save-attachments.c | 21 |
2 files changed, 8 insertions, 17 deletions
diff --git a/plugins/save-attachments/ChangeLog b/plugins/save-attachments/ChangeLog index 0ecc0d99cf..803d29a762 100644 --- a/plugins/save-attachments/ChangeLog +++ b/plugins/save-attachments/ChangeLog @@ -1,3 +1,7 @@ +2005-01-04 Philip Van Hoof <pvanhoof@gnome.org> + + * save-attachments.c: Use standard error messages + 2004-12-27 Philip Van Hoof <pvanhoof@gnome.org> * save-attachments.c: Warning when overwriting file diff --git a/plugins/save-attachments/save-attachments.c b/plugins/save-attachments/save-attachments.c index 1a903037da..9b6f4e6ebc 100644 --- a/plugins/save-attachments/save-attachments.c +++ b/plugins/save-attachments/save-attachments.c @@ -53,6 +53,8 @@ #include <camel/camel-multipart.h> #include <camel/camel-utf8.h> +#include "widgets/misc/e-error.h" + #include "mail/em-menu.h" #include "mail/em-utils.h" @@ -218,23 +220,8 @@ save_part(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, void *d) * the POSIX access-call should suffice for checking the file existence. */ - if (access (save, F_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?"), save); - - 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 (access (save, F_OK)) + doit = e_error_run(NULL, E_ERROR_ASK_FILE_EXISTS_OVERWRITE, save, NULL) == GTK_RESPONSE_OK; if (doit) em_utils_save_part_to_file(NULL, save, part); |