[evolution] Bug 761346 - More Camel introspection fixes



commit 5214272fa4eb28ed70106b60acb3ec27f94d6fee
Author: Milan Crha <mcrha redhat com>
Date:   Tue Feb 9 14:43:40 2016 +0100

    Bug 761346 - More Camel introspection fixes

 em-format/e-mail-formatter-utils.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/em-format/e-mail-formatter-utils.c b/em-format/e-mail-formatter-utils.c
index 58eb636..b890c45 100644
--- a/em-format/e-mail-formatter-utils.c
+++ b/em-format/e-mail-formatter-utils.c
@@ -401,7 +401,7 @@ e_mail_formatter_format_header (EMailFormatter *formatter,
                flags |= E_MAIL_FORMATTER_HEADER_FLAG_BOLD;
 
        } else if (g_str_equal (canon_name, "Newsgroups")) {
-               struct _camel_header_newsgroup *ng, *scan;
+               GSList *ng, *scan;
                GString *html;
 
                buf = camel_header_unfold (header_value);
@@ -416,19 +416,21 @@ e_mail_formatter_format_header (EMailFormatter *formatter,
                html = g_string_new ("");
                scan = ng;
                while (scan) {
+                       const gchar *newsgroup = scan->data;
+
                        if (flags & E_MAIL_FORMATTER_HEADER_FLAG_NOLINKS)
                                g_string_append_printf (
-                                       html, "%s", scan->newsgroup);
+                                       html, "%s", newsgroup);
                        else
                                g_string_append_printf (
                                        html, "<a href=\"news:%s\";>%s</a>",
-                                       scan->newsgroup, scan->newsgroup);
-                       scan = scan->next;
+                                       newsgroup, newsgroup);
+                       scan = g_slist_next (scan);
                        if (scan)
                                g_string_append_printf (html, ", ");
                }
 
-               camel_header_newsgroups_free (ng);
+               g_slist_free_full (ng, g_free);
 
                txt = html->str;
                value = g_string_free (html, FALSE);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]