+static AlertValue mimeview_save_all_error_ask(gint n)
+{
+ gchar *message = g_strdup_printf(
+ _("An error has ocurred while saving attachment #%d. "
+ "Do you want to cancel operation or skip error and "
+ "continue?"), n);
+ AlertValue av = alertpanel_full(_("Error saving all attachments"),
+ message, GTK_STOCK_CANCEL, _("Skip"), _("Skip all"),
+ FALSE, NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ g_free(message);
+ return av;
+}
+
+static void mimeview_save_all_info(gint errors, gint total)
+{
+ if (!errors) {
+ gchar *msg = g_strdup_printf(
+ ngettext("%d attachment saved succesfully.",
+ "%d attachments saved succesfully.",
+ total),
+ total);
+ alertpanel_notice(msg);
+ g_free(msg);
+ } else {
+ gchar *msg1 = g_strdup_printf(
+ ngettext("%d attachment saved succesfully",
+ "%d attachments saved succesfully",
+ total - errors),
+ total - errors);
+ gchar *msg2 = g_strdup_printf(
+ ngettext("%s, %d attachment failed.",
+ "%s, %d attachments failed.",
+ errors),
+ msg1, errors);
+ alertpanel_warning(msg2);
+ g_free(msg2);
+ g_free(msg1);
+ }
+}
+