[evolution/wip/webkit2] Bug 761346 - More Camel introspection fixes



commit cf1e0ade1d356eb4595df29bd228ae1bc2869a6c
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]