From: Alfons Hoogervorst Date: Sun, 19 Jan 2003 16:04:36 +0000 (+0000) Subject: * src/mimeview.c X-Git-Tag: rel_0_8_9~18 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=a0be0442d292f96f5bbd7a620227c2477d91be78 * src/mimeview.c mimeview_save_all(): display name of file before overwriting; continue saving all, even when one overwrite was cancelled --- diff --git a/ChangeLog.claws b/ChangeLog.claws index 32bd942dc..1f561f0df 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,9 @@ +2003-01-19 [alfons] 0.8.8claws120 + + * src/mimeview.c + mimeview_save_all(): display name of file before overwriting; + continue saving all, even when one overwrite was cancelled + 2003-01-19 [christoph] 0.8.8claws119 * src/summaryview.c diff --git a/configure.ac b/configure.ac index 92ede626f..b32d24d36 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=8 MICRO_VERSION=8 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws119 +EXTRA_VERSION=claws120 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/mimeview.c b/src/mimeview.c index 03d31a68f..cb8db9ce6 100644 --- a/src/mimeview.c +++ b/src/mimeview.c @@ -812,13 +812,14 @@ static void mimeview_save_all(MimeView *mimeview) /* return to first children */ attachment = partinfo->parent->children->next; /* for each attachment, extract it in the selected dir. */ - while(attachment != NULL) - { + while (attachment != NULL) { static guint subst_cnt = 1; gchar *attachdir; gchar *attachname = (attachment->filename) ? g_strdup(attachment->filename) : g_strdup_printf("noname.%d",subst_cnt++); + AlertValue aval; + gchar *res; subst_chars(attachname, "/\\", G_DIR_SEPARATOR); subst_chars(attachname, ":?*&|<>\t\r\n", '_'); @@ -830,17 +831,17 @@ static void mimeview_save_all(MimeView *mimeview) attachdir = g_dirname(buf); make_dir_hier(attachdir); g_free(attachdir); - g_free(attachname); if (is_file_exist(buf)) { - AlertValue aval; - - aval = alertpanel(_("Overwrite"), - _("Overwrite existing file?"), - _("OK"), _("Cancel"), NULL); - if (G_ALERTDEFAULT != aval) return; + res = g_strdup_printf(_("Overwrite existing file '%s'?"), + attachname); + aval = alertpanel(_("Overwrite"), res, _("OK"), + _("Cancel"), NULL); + g_free(res); } - if (procmime_get_part(buf, mimeview->file, attachment) < 0) + g_free(attachname); + + if (G_ALERTDEFAULT == aval && procmime_get_part(buf, mimeview->file, attachment) < 0) alertpanel_error(_("Can't save the part of multipart message.")); attachment = attachment->next; }