gboolean is_outgoing;
gboolean is_draft;
- gchar *first_address;
TnyHeader *header;
TnyHeaderFlags priority_flags;
PangoAttrList *attr_list;
priv->header = NULL;
- priv->first_address = NULL;
priv->custom_labels = NULL;
main_vbox = gtk_vbox_new (FALSE, 0);
gchar *recipients;
const gchar *label;
GSList *recipient_list;
+ gchar *first_address;
g_return_if_fail (MODEST_IS_COMPACT_MAIL_HEADER_VIEW (self));
priv = MODEST_COMPACT_MAIL_HEADER_VIEW_GET_PRIVATE (self);
recipients = tny_header_dup_from (TNY_HEADER (priv->header));
}
- g_free (priv->first_address);
recipient_list = modest_text_utils_split_addresses_list (recipients);
if (recipient_list == NULL) {
- priv->first_address = NULL;
+ first_address = NULL;
} else {
gchar *first_recipient;
first_recipient = (gchar *) recipient_list->data;
- priv->first_address = first_recipient?g_strdup (first_recipient):NULL;
+ first_address = first_recipient?g_strdup (first_recipient):NULL;
}
g_slist_foreach (recipient_list, (GFunc) g_free, NULL);
g_slist_free (recipient_list);
gtk_label_set_text (GTK_LABEL (priv->fromto_label), label);
- if (recipients)
- gtk_label_set_text (GTK_LABEL (priv->fromto_contents), priv->first_address);
+ if (recipients) {
+ modest_text_utils_get_display_address (first_address);
+ gtk_label_set_text (GTK_LABEL (priv->fromto_contents), first_address);
+ g_free (recipients);
+ g_free (first_address);
+ }
- g_free (recipients);
}
static void