[evolution-rss] correctly perform resize on specified img width



commit e2ed1da7eba8cb9321e5515c3e20f2b6d4423af7
Author: Lucian Langa <lucilanga gnome org>
Date:   Fri Jan 1 14:09:21 2010 +0200

    correctly perform resize on specified img width

 src/rss.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/rss.c b/src/rss.c
index 71a28ca..f02c32e 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -2488,15 +2488,19 @@ void org_gnome_cooly_format_rss(void *ep, EMFormatHookTarget *t)	//camelmimepart
                                                          (GError **)NULL);
 					if (pix)
 						real_width = gdk_pixbuf_get_width(pix);
-					if (real_width > width) {
-						xmlSetProp(doc, (xmlChar *)"width", (xmlChar *)wids);
-						goto pixdone;
-					}
+
+					d("url:%s\n", url);
+					d("width:%d\n", width);
+					d("real_width:%d\n", real_width);
+
 					wid = xmlGetProp(doc, (xmlChar *)"width");
 					if (wid) {
 						if (atof((const char *)wid) > width)
 							xmlSetProp(doc, (xmlChar *)"width", (xmlChar *)wids);
 						g_free(wid);
+						goto pixdone;
+					} else if (real_width > width) {
+						xmlSetProp(doc, (xmlChar *)"width", (xmlChar *)wids);
 					}
 pixdone:			g_free(url);
 				}



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