aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-display.c19
2 files changed, 15 insertions, 9 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 7e6203f68c..c973064cfc 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-15 Harry Lu <harry.lu@sun.com>
+
+ * mail-display.c (write_data_to_file): Show file name when prompt
+ to user for overwrite.
+
2002-11-21 Harry Lu <harry.lu@sun.com>
* mail-display.c (do_attachment_header): Enable dragging of all
diff --git a/mail/mail-display.c b/mail/mail-display.c
index 88c17af01b..559a3c92dc 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -173,8 +173,7 @@ write_data_written(CamelMimePart *part, char *name, int done, void *data)
static gboolean
write_data_to_file (CamelMimePart *part, const char *name, gboolean unique)
{
- int fd;
- int ret = FALSE;
+ int fd, ret = FALSE;
g_return_val_if_fail (CAMEL_IS_MIME_PART (part), FALSE);
@@ -182,13 +181,15 @@ write_data_to_file (CamelMimePart *part, const char *name, gboolean unique)
if (fd == -1 && errno == EEXIST && !unique) {
GtkWidget *dlg;
int button;
-
- dlg = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
- _("A file by that name already exists.\nOverwrite it?"));
- g_object_set(dlg, "title", _("Overwrite file?"), "allow_grow", TRUE, NULL);
- button = gtk_dialog_run((GtkDialog *)dlg);
- gtk_widget_destroy(dlg);
- g_object_unref(dlg);
+
+ dlg = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
+ _("File `%s' already exists.\nOverwrite it?"),
+ name);
+
+ g_object_set (dlg, "title", _("Overwrite file?"), "allow_grow", TRUE, NULL);
+ button = gtk_dialog_run ((GtkDialog *) dlg);
+ gtk_widget_destroy (dlg);
+ g_object_unref (dlg);
if (button != GTK_RESPONSE_YES)
return FALSE;