X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fwidgets%2Fmodest-compact-mail-header-view.c;h=d248f038db160fb82b9fcbc3a9be431b48901d68;hp=d5652e1a0c4468d26f79e0131716ba334b930e77;hb=4927d2ba3643bba250d1c0e12a8c732db905fad3;hpb=6d15579f66086b38e6794fd636a0e88bb2cb6470 diff --git a/src/widgets/modest-compact-mail-header-view.c b/src/widgets/modest-compact-mail-header-view.c index d5652e1..d248f03 100644 --- a/src/widgets/modest-compact-mail-header-view.c +++ b/src/widgets/modest-compact-mail-header-view.c @@ -656,9 +656,7 @@ fill_address (ModestCompactMailHeaderView *self) ModestCompactMailHeaderViewPriv *priv; 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); @@ -670,25 +668,18 @@ fill_address (ModestCompactMailHeaderView *self) recipients = tny_header_dup_from (TNY_HEADER (priv->header)); } - recipient_list = modest_text_utils_split_addresses_list (recipients); - if (recipient_list == NULL) { - first_address = NULL; - } else { - gchar *first_recipient; - - first_recipient = (gchar *) recipient_list->data; - first_address = first_recipient?g_strdup (first_recipient):NULL; - } - g_slist_foreach (recipient_list, (GFunc) g_free, NULL); - g_slist_free (recipient_list); - + /* Set label */ gtk_label_set_text (GTK_LABEL (priv->fromto_label), label); + + /* Set recipients */ if (recipients) { - modest_text_utils_get_display_address (first_address); - gtk_label_set_text (GTK_LABEL (priv->fromto_contents), first_address); + gchar *addresses; + + addresses = modest_text_utils_get_display_addresses ((const gchar *) recipients); + gtk_label_set_text (GTK_LABEL (priv->fromto_contents), + (addresses) ? addresses : _("mail_va_no_to")); + g_free (addresses); g_free (recipients); - g_free (first_address); } - }