[evolution-rss] fix resizing of images



commit bd6a4d9a7e36d80e4386456190da9a144e2484a9
Author: Lucian Langa <lucilanga gnome org>
Date:   Wed May 26 23:28:34 2010 +0300

    fix resizing of images

 src/rss.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/rss.c b/src/rss.c
index 48d9711..a7af3e8 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -2252,17 +2252,16 @@ void org_gnome_cooly_format_rss(void *ep, EMFormatHookTarget *t)	//camelmimepart
 						doc,
 						(xmlChar *)"src",
 						(xmlChar *)real_image);
-					g_free(real_image);
 				}
 				if (gconf_client_get_bool (rss_gconf,
-					GCONF_KEY_IMAGE_RESIZE, NULL)) {
+					GCONF_KEY_IMAGE_RESIZE, NULL) && real_image) {
 					pix = gdk_pixbuf_new_from_file(
-						(const char *)url,
+						(const char *)real_image+7, //skip scheme part
 						(GError **)NULL);
 					if (pix)
 						real_width = gdk_pixbuf_get_width(pix);
 
-					d("url:%s\n", url);
+					d("real_image:%s\n", real_image);
 					d("width:%d\n", width);
 					d("real_width:%d\n", real_width);
 
@@ -2283,7 +2282,7 @@ void org_gnome_cooly_format_rss(void *ep, EMFormatHookTarget *t)	//camelmimepart
 							(xmlChar *)"width",
 							(xmlChar *)wids);
 					}
-pixdone:			g_free(url);
+pixdone:			g_free(real_image);
 				}
 			}
 			xmlDocDumpMemory(src, &buff, (int*)&size);



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