+2005-05-30 [colin] 1.9.11cvs21
+
+ * src/compose.c
+ Fix concatenation of different headers of
+ the same type (bug #645)
+ * src/prefs_folder_item.c
+ Fix bug #699 (setting color to black doesn't
+ work immediately)
+ * src/procmime.c
+ Print out decoding error only once per
+ block
+
2005-05-30 [paul] 1.9.11cvs20
* src/common/template.c
ComposeEntryType type)
{
gchar *header;
-
+ gchar **parts = g_strsplit(address, ",", 0);
+ int i = 0;
if (!address || *address == '\0') return;
-#if 0 /* NEW COMPOSE GUI */
- switch (type) {
- case COMPOSE_CC:
- entry = GTK_ENTRY(compose->cc_entry);
- break;
- case COMPOSE_BCC:
- entry = GTK_ENTRY(compose->bcc_entry);
- break;
- case COMPOSE_NEWSGROUPS:
- entry = GTK_ENTRY(compose->newsgroups_entry);
- break;
- case COMPOSE_TO:
- default:
- entry = GTK_ENTRY(compose->to_entry);
- break;
- }
-
- text = gtk_entry_get_text(entry);
- if (*text != '\0')
- gtk_entry_append_text(entry, ", ");
- gtk_entry_append_text(entry, address);
-#endif
-
switch (type) {
case COMPOSE_CC:
header = N_("Cc:");
break;
}
header = prefs_common.trans_hdr ? gettext(header) : header;
-
- compose_add_header_entry(compose, header, (gchar *)address);
+ while (parts[i] && *parts[i]) {
+ gchar *tmp = parts[i];
+ while (*tmp == ' ')
+ tmp++;
+ compose_add_header_entry(compose, header, tmp);
+ i++;
+ }
+ g_strfreev(parts);
}
void compose_entry_mark_default_to(Compose *compose, const gchar *mailto)
gchar *name;
if (!is_file_exist(file)) {
- g_warning("File %s doesn't exist\n", file);
+ g_warning("File %s doesn't exist\n", filename);
return;
}
if ((size = get_file_size(file)) < 0) {
- g_warning("Can't get file size of %s\n", file);
+ g_warning("Can't get file size of %s\n", filename);
return;
}
if (size == 0) {
- alertpanel_notice(_("File %s is empty."), file);
+ alertpanel_notice(_("File %s is empty."), filename);
return;
}
if ((fp = fopen(file, "rb")) == NULL) {
- alertpanel_error(_("Can't read %s."), file);
+ alertpanel_error(_("Can't read %s."), filename);
return;
}
fclose(fp);
gchar outbuf[BUFFSIZE];
gint len;
Base64Decoder *decoder;
+ gboolean got_error = FALSE;
gboolean uncanonicalize = FALSE;
FILE *tmpfp = outfp;
decoder = base64_decoder_new();
while ((ftell(infp) < readend) && (fgets(buf, sizeof(buf), infp) != NULL)) {
len = base64_decoder_decode(decoder, buf, outbuf);
- if (len < 0) {
+ if (len < 0 && !got_error) {
g_warning("Bad BASE64 content.\n");
fwrite(_("[Error decoding BASE64]\n"),
sizeof(gchar),
strlen(_("[Error decoding BASE64]\n")),
tmpfp);
+ got_error = TRUE;
continue;
+ } else if (len >= 0) {
+ /* print out the error message only once
+ * per block */
+ got_error = FALSE;
}
fwrite(outbuf, sizeof(gchar), len, tmpfp);
}