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 586d7b1c23e3e59200e075c7b80293db05772f4e..df982dc425ffb52414f11140186451f2a75bad19 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;