2007-11-19 [colin] 3.1.0cvs6
[claws.git] / src / compose.c
index eb27cb5697fe093e6a54083f0f7b4cb8bc55872c..8e1789eeec56e0ab330887f347a3433fbe0bbc97 100644 (file)
@@ -2430,19 +2430,31 @@ static void compose_entries_set(Compose *compose, const gchar *mailto)
        }
 
        if (attach) {
-               gint i = 0;
+               gint i = 0, att = 0;
+               gchar *warn_files = NULL;
                while (attach[i] != NULL) {
                        gchar *utf8_filename = conv_filename_to_utf8(attach[i]);
                        if (utf8_filename) {
                                if (compose_attach_append(compose, attach[i], utf8_filename, NULL)) {
-                                       alertpanel_notice(_("The file '%s' has been attached."), utf8_filename);
-                               } 
+                                       gchar *tmp = g_strdup_printf("%s%s\n",
+                                                       warn_files?warn_files:"",
+                                                       utf8_filename);
+                                       g_free(warn_files);
+                                       warn_files = tmp;
+                                       att++;
+                               }
                                g_free(utf8_filename);
                        } else {
                                alertpanel_error(_("Couldn't attach a file (charset conversion failed)."));
                        }
                        i++;
                }
+               if (warn_files) {
+                       alertpanel_notice(ngettext(
+                       "The following file has been attached: \n%s",
+                       "The following files have been attached: \n%s", att), warn_files);
+                       g_free(warn_files);
+               }
        }
        g_free(to);
        g_free(cc);