2005-05-30 [colin] 1.9.11cvs21
authorColin Leroy <colin@colino.net>
Mon, 30 May 2005 19:53:13 +0000 (19:53 +0000)
committerColin Leroy <colin@colino.net>
Mon, 30 May 2005 19:53:13 +0000 (19:53 +0000)
* 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

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/compose.c
src/prefs_folder_item.c
src/procmime.c

index 6199d30..475ddfe 100644 (file)
@@ -1,3 +1,15 @@
+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
index 275fdc4..116c127 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.204.2.38 -r 1.204.2.39 src/prefs_common.c; ) > 1.9.11cvs18.patchset
 ( cvs diff -u -r 0 -r 1 doc/src/rfc2368.txt; cvs diff -u -r 1.382.2.121 -r 1.382.2.122 src/compose.c; ) > 1.9.11cvs19.patchset
 ( cvs diff -u -r 1.2.4.6 -r 1.2.4.7 src/common/template.c; ) > 1.9.11cvs20.patchset
+( cvs diff -u -r 1.382.2.122 -r 1.382.2.123 src/compose.c; cvs diff -u -r 1.52.2.10 -r 1.52.2.11 src/prefs_folder_item.c; cvs diff -u -r 1.49.2.41 -r 1.49.2.42 src/procmime.c; ) > 1.9.11cvs21.patchset
index 11ed24d..4983469 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=20
+EXTRA_VERSION=21
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index f896b2c..a44ad53 100644 (file)
@@ -1452,32 +1452,10 @@ void compose_entry_append(Compose *compose, const gchar *address,
                          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:");
@@ -1500,8 +1478,14 @@ void compose_entry_append(Compose *compose, const gchar *address,
                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)
@@ -2284,19 +2268,19 @@ static void compose_attach_append(Compose *compose, const gchar *file,
        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);
index 2f957ae..ad92a67 100644 (file)
@@ -330,10 +330,11 @@ static void general_save_folder_prefs(FolderItem *folder, FolderItemGeneralPage
        }
 
        if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->folder_color_rec_checkbtn))) {
+               int old_color = prefs->color;
                prefs->color = page->folder_color;
        
                /* update folder view */
-               if (prefs->color > 0)
+               if (prefs->color != old_color)
                        folder_item_update(folder, F_ITEM_UPDATE_MSGCNT);
        }
 
index 9092d85..c6e855d 100644 (file)
@@ -314,6 +314,7 @@ gboolean procmime_decode_content(MimeInfo *mimeinfo)
                gchar outbuf[BUFFSIZE];
                gint len;
                Base64Decoder *decoder;
+               gboolean got_error = FALSE;
                gboolean uncanonicalize = FALSE;
                FILE *tmpfp = outfp;
 
@@ -331,13 +332,18 @@ gboolean procmime_decode_content(MimeInfo *mimeinfo)
                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);
                }