From c6ed3eedc881b57ac7d767a282413db7966f8a8b Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Thu, 27 Mar 2003 21:37:07 +0000 Subject: Likewise. * e-summary.c (e_summary_init): Likewise. * e-summary-weather.c (e_summary_weather_get_html): Likewise. (weather_make_html): Likewise. * e-summary-mail.c (e_summary_mail_generate_html): Fix so it handles the fact that the translated strings are already in UTF8. * e-summary-rdf.c (tree_walk): Likewise. (display_doc): Likewise. svn path=/trunk/; revision=20553 --- my-evolution/e-summary-rdf.c | 48 ++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 26 deletions(-) (limited to 'my-evolution/e-summary-rdf.c') diff --git a/my-evolution/e-summary-rdf.c b/my-evolution/e-summary-rdf.c index b7667b2a99..70ce86687d 100644 --- a/my-evolution/e-summary-rdf.c +++ b/my-evolution/e-summary-rdf.c @@ -251,15 +251,17 @@ tree_walk (xmlNodePtr root, if (*u != '\0') g_string_sprintfa (html, "", u); - if (r->cache->encoding) - t = e_utf8_from_charset_string (r->cache->encoding, t); - else - t = e_utf8_from_locale_string (t); - g_string_append (html, t); - g_free (t); - if (*u != '\0') { - g_string_append (html, ""); + + if (r->cache->encoding) { + char *tmp = e_utf8_from_charset_string (r->cache->encoding, t); + g_string_append (html, tmp); + g_free (tmp); + } else { + g_string_append (html, t); } + + if (*u != '\0') + g_string_append (html, ""); g_string_append (html, ""); if (r->shown == FALSE) { @@ -277,14 +279,15 @@ tree_walk (xmlNodePtr root, g_string_append (html, tmp); g_free (tmp); - if (r->cache->encoding) - p = e_utf8_from_charset_string (r->cache->encoding, p); - else - p = e_utf8_from_locale_string (p); - tmp = g_strdup_printf ("%s\n", p); - g_free (p); - g_string_append (html, tmp); - g_free (tmp); + if (r->cache->encoding) { + char *tmp = e_utf8_from_charset_string (r->cache->encoding, p); + g_string_append (html, tmp); + g_free (tmp); + } else { + g_string_append (html, p); + } + + g_string_append (html, "\n"); } g_string_append (html, ""); } @@ -298,16 +301,9 @@ display_doc (RDF *r) "width=\"48\" height=\"48\">"); if (r->cache == NULL) { - char *tmp_utf, *str; - - str = g_strdup_printf ("%s:
%s", _("Error downloading RDF"), - r->uri); - tmp_utf = e_utf8_from_locale_string (str); - g_free (str); - - g_string_append (html, tmp_utf); - g_string_append (html, ""); - g_free (tmp_utf); + g_string_append_printf (html, "%s:
%s", + _("Error downloading RDF"), + r->uri); } else { tree_walk (xmlDocGetRootElement (r->cache), r, html); } -- cgit v1.2.3