ignore empty or whitespace only header lines
authorChristoph Hohmann <reboot@gmx.ch>
Wed, 17 Oct 2001 18:52:35 +0000 (18:52 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Wed, 17 Oct 2001 18:52:35 +0000 (18:52 +0000)
ChangeLog.claws
configure.in
src/compose.c

index 0762203f85e21dd19c0d754d4afb6b44c7231225..2de2978739da95d0f6c4bcc76255a2f5da33b605 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-17 [christoph] 0.6.3claws21
+
+       * src/compose.c
+               ignore empty or whitespace only header lines
+
 2001-10-17 [paul]      0.6.3claws20
 
        * sync with sylpheed 0.6.3cvs7
 2001-10-17 [paul]      0.6.3claws20
 
        * sync with sylpheed 0.6.3cvs7
index f1bbb2da6dca1a37f9aa4fbf16fc4370ae7736f1..0c70d57154db8ddd5cb7e647b534f96093e0b7da 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=6
 MICRO_VERSION=3
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=3
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws20
+EXTRA_VERSION=claws21
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
index 0ba52c5b9cf5ac36c2c92428e3b40092ff3f04e5..b5a085961cfd05f7d10619636f2b7f17d3917c69 100644 (file)
@@ -2550,14 +2550,16 @@ gboolean compose_check_for_valid_recipient(Compose *compose) {
                gchar *header;
                gchar *entry;
                header = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(((compose_headerentry *)list->data)->combo)->entry));
                gchar *header;
                gchar *entry;
                header = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(((compose_headerentry *)list->data)->combo)->entry));
-               entry = gtk_entry_get_text(GTK_ENTRY(((compose_headerentry *)list->data)->entry));
-               if(strlen(entry)) {
+               entry = gtk_editable_get_chars(GTK_EDITABLE(((compose_headerentry *)list->data)->entry), 0, -1);
+               g_strstrip(entry);
+               if(entry[0] != '\0') {
                        for(strptr = recipient_headers; *strptr != NULL; strptr++) {
                                if(!strcmp(header, (prefs_common.trans_hdr ? gettext(*strptr) : *strptr))) {
                                        recipient_found = TRUE;
                                }
                        }
                }
                        for(strptr = recipient_headers; *strptr != NULL; strptr++) {
                                if(!strcmp(header, (prefs_common.trans_hdr ? gettext(*strptr) : *strptr))) {
                                        recipient_found = TRUE;
                                }
                        }
                }
+               g_free(entry);
        }
        return recipient_found;
 }
        }
        return recipient_found;
 }
@@ -3141,18 +3143,20 @@ static gint compose_write_headers_from_headerlist(Compose *compose,
                        str = gtk_entry_get_text(GTK_ENTRY(headerentry->entry));
                        Xstrdup_a(str, str, return -1);
                        g_strstrip(str);
                        str = gtk_entry_get_text(GTK_ENTRY(headerentry->entry));
                        Xstrdup_a(str, str, return -1);
                        g_strstrip(str);
-                       if(list_append_func)
-                               *dest_list = list_append_func(*dest_list, str);
-                       compose_convert_header
-                               (buf, sizeof(buf), str,
-                               strlen(header) + 2);
-                       if(first_address) {
-                               fprintf(fp, "%s: ", header);
-                               first_address = FALSE;
-                       } else {
-                               fprintf(fp, ", ");
+                       if(str[0] != '\0') {
+                               if(list_append_func)
+                                       *dest_list = list_append_func(*dest_list, str);
+                               compose_convert_header
+                                       (buf, sizeof(buf), str,
+                                       strlen(header) + 2);
+                               if(first_address) {
+                                       fprintf(fp, "%s: ", header);
+                                       first_address = FALSE;
+                               } else {
+                                       fprintf(fp, ", ");
+                               }
+                               fprintf(fp, "%s", buf);
                        }
                        }
-                       fprintf(fp, "%s", buf);
                }
        }
        if(!first_address) {
                }
        }
        if(!first_address) {