[evolution-rss] fix images for older evolution



commit 2976ae6329b1a3464381b504c34c18d5bb528068
Author: Lucian Langa <lucilanga gnome org>
Date:   Thu Jun 3 17:05:11 2010 +0300

    fix images for older evolution

 src/rss-image.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/rss-image.c b/src/rss-image.c
index 1f21f73..9a37b72 100644
--- a/src/rss-image.c
+++ b/src/rss-image.c
@@ -519,8 +519,12 @@ verify_image(gchar *uri, EMFormatHTML *format)
 			if (name) {
 				tname = decode_image_cache_filename(name);
 				g_free(name);
+#if (EVOLUTION_VERSION >= 23000)
 				result = g_filename_to_uri (tname, NULL, NULL);
 				g_free(tname);
+#else
+				result = tname;
+#endif
 			}
 			if (duri)
 				g_free(duri);
@@ -537,7 +541,11 @@ verify_image(gchar *uri, EMFormatHTML *format)
 		mime_type = g_content_type_guess(NULL, (guchar *)contents, length, NULL);
 		/*FIXME mime type here could be wrong */
 		if (g_ascii_strncasecmp (mime_type, "image/", 6)) {
+#if (EVOLUTION_VERSION >= 23000)
 			result = g_filename_to_uri (pixfile, NULL, NULL);
+#else
+			result = g_strdup(pixfile);
+#endif
 			if (duri)
 				g_free(duri);
 			return result;
@@ -640,7 +648,7 @@ fetch_image_redraw(gchar *url, gchar *link, gpointer data)
 	}
 	g_free(cache_file);
 
-working:burl = g_base64_encode((guchar *)tmpurl, strlen(tmpurl));
+working:burl = (gchar *)g_base64_encode((guchar *)tmpurl, strlen(tmpurl));
 	result = g_strdup_printf("img:%s", burl);
 	g_free(burl);
 error:	g_free(tmpurl);



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