fix bug 3978, '"From" column displays both name and email address for Outbox'
authorPaul <paul@claws-mail.org>
Wed, 11 Apr 2018 14:45:55 +0000 (15:45 +0100)
committerPaul <paul@claws-mail.org>
Wed, 11 Apr 2018 14:45:55 +0000 (15:45 +0100)
src/summaryview.c

index 586d7b1..df982dc 100644 (file)
@@ -3468,10 +3468,19 @@ static inline void summary_set_header(SummaryView *summaryview, gchar *text[],
        
        to_text = msginfo->to ? msginfo->to : 
                   (msginfo->cc ? msginfo->cc :
-                    (msginfo->newsgroups ? msginfo->newsgroups : _("(No Recipient)")
+                    (msginfo->newsgroups ? msginfo->newsgroups : NULL
                     )
                   );
 
+       if (!to_text)
+               to_text = _("(No Recipient)");
+       else {
+               if (prefs_common.summary_from_show == SHOW_NAME)
+                       to_text = procheader_get_fromname(to_text);
+               else if (prefs_common.summary_from_show == SHOW_ADDR)
+                       extract_address(to_text);
+       }
+
        text[col_pos[S_COL_TO]] = to_text;
        if (!should_swap) {
                text[col_pos[S_COL_FROM]] = from_text;