[evolution-rss] Bug 733139 - Do not touch message body, if nothing changed
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-rss] Bug 733139 - Do not touch message body, if nothing changed
- Date: Thu, 31 Jul 2014 07:32:23 +0000 (UTC)
commit e6d784c303fe7cd299e0477141492c4250e3a595
Author: Milan Crha <mcrha redhat com>
Date: Thu Jul 31 09:32:01 2014 +0200
Bug 733139 - Do not touch message body, if nothing changed
src/parser.c | 8 ++++++++
src/rss.c | 10 +---------
2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/parser.c b/src/parser.c
index ef20856..98c4f95 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -89,6 +89,7 @@ rss_html_url_decode(const char *html, int len)
xmlDoc *doc = NULL;
gchar *url;
gchar *duri = NULL;
+ gboolean any_changed = FALSE;
src = (xmlDoc *)parse_html_sux(html, len);
@@ -106,6 +107,7 @@ rss_html_url_decode(const char *html, int len)
#else
duri = g_strconcat("evo-file://", tmp, NULL);
#endif
+ any_changed = TRUE;
g_free(tmp);
xmlSetProp(
(xmlNodePtr)doc,
@@ -115,6 +117,12 @@ rss_html_url_decode(const char *html, int len)
xmlFree(url);
}
}
+
+ if (!any_changed) {
+ xmlFreeDoc(src);
+ src = NULL;
+ }
+
return src;
}
diff --git a/src/rss.c b/src/rss.c
index c23cdf8..11c7167 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -1326,15 +1326,7 @@ org_gnome_evolution_presend (EPlugin *ep, EMEventTargetComposer *t)
gtkhtml_editor_set_text_html((GtkhtmlEditor *)t->composer, (gchar *)buff, size);
#endif
xmlFree (buff);
- } else {
-#if EVOLUTION_VERSION >= 31303
- editor = e_msg_composer_get_editor (t->composer);
- view = e_html_editor_get_view (editor);
- e_html_editor_view_set_text_html (view, text);
-#else
- gtkhtml_editor_set_text_html((GtkhtmlEditor *)t->composer, (gchar *)text, length);
-#endif
- }
+ } /* Do not touch message body, if nothing changed */
g_free (text);
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]