show recipient on 'from' for all accounts
[claws.git] / src / summaryview.c
index 19516e7b588796051eb11daee1a2a34926137209..004dbbfe1270b7ceb6e7668af5a9c43dacf2e046 100644 (file)
@@ -1793,14 +1793,13 @@ static void summary_set_header(gchar *text[], MsgInfo *msginfo)
        text[S_COL_FROM] = msginfo->fromname ? msginfo->fromname :
                _("(No From)");
        if (prefs_common.swap_from && msginfo->from && msginfo->to &&
-           cur_account && cur_account->address &&
            !MSG_IS_NEWS(msginfo->flags)) {
                gchar *from;
 
                Xalloca(from, strlen(msginfo->from) + 1, return);
                strcpy(from, msginfo->from);
                extract_address(from);
-               if (!strcmp(from, cur_account->address)) {
+               if (account_find_mail_from_address(from)) {
                        g_free(to);
                        to = g_strconcat("-->", msginfo->to, NULL);
                        text[S_COL_FROM] = to;
@@ -1876,7 +1875,6 @@ static void summary_display_msg(SummaryView *summaryview, GtkCTreeNode *row,
                summary_status_show(summaryview);
        }
 
-       if (GTK_WIDGET_VISIBLE(summaryview->headerwin->window))
        if (new_window) {
                MessageView *msgview;
 
@@ -1899,6 +1897,7 @@ static void summary_display_msg(SummaryView *summaryview, GtkCTreeNode *row,
                gtkut_ctree_node_move_if_on_the_edge(ctree, row);
        }
 
+       if (GTK_WIDGET_VISIBLE(summaryview->headerwin->window))
                header_window_show(summaryview->headerwin, msginfo);
 
        lock = FALSE;