aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarry Lu <harry.lu@sun.com>2002-11-23 02:23:54 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-11-23 02:23:54 +0800
commit0c8d26e027f1ee3b809f32186adf059e9e541deb (patch)
treed9cc2f08e9a0c5a315ddc8aca5a64c4eea63c26d
parent239c8b9bf70de8b08efeb6b1346a877148d68c31 (diff)
downloadgsoc2013-evolution-0c8d26e027f1ee3b809f32186adf059e9e541deb.tar
gsoc2013-evolution-0c8d26e027f1ee3b809f32186adf059e9e541deb.tar.gz
gsoc2013-evolution-0c8d26e027f1ee3b809f32186adf059e9e541deb.tar.bz2
gsoc2013-evolution-0c8d26e027f1ee3b809f32186adf059e9e541deb.tar.lz
gsoc2013-evolution-0c8d26e027f1ee3b809f32186adf059e9e541deb.tar.xz
gsoc2013-evolution-0c8d26e027f1ee3b809f32186adf059e9e541deb.tar.zst
gsoc2013-evolution-0c8d26e027f1ee3b809f32186adf059e9e541deb.zip
Show file name when prompt to user for overwrite.
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. svn path=/trunk/; revision=18886
-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;