[evolution-rss] Bug 639825 - RSS plugin freezes Evolution on some posts if 'Show full text' is enabled



commit bff2cf675df01ce4f222bcb6b2c5c9d3d7723031
Author: Lucian Langa <lucilanga gnome org>
Date:   Tue Jan 25 21:38:22 2011 +0200

    Bug 639825 - RSS plugin freezes Evolution on some posts if 'Show full text' is enabled

 src/rss.c |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/src/rss.c b/src/rss.c
index 77ba177..ef20e00 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -1364,7 +1364,8 @@ webkit_net_status (WebKitWebView *view,
 		GtkWidget *data)
 {
 	GtkAllocation alloc;
-	gint width;
+	GtkRequisition req;
+	gint width, w;
 	WebKitLoadStatus status = webkit_web_view_get_load_status (view);
 	switch (status) {
 		case WEBKIT_LOAD_FINISHED:
@@ -1372,9 +1373,19 @@ webkit_net_status (WebKitWebView *view,
 			if (rf->mozembed) {
 				gtk_widget_get_allocation(rf->mozembed, &alloc);
 				width = alloc.width;
-				if (resize_pane_hsize > width && width != 1)
+				if (resize_pane_hsize > width && width != 1) {
 					gtk_widget_set_size_request(rf->mozembed,
-						(int)resize_pane_hsize-14, -1);
+						-1, -1);
+					gtk_widget_size_request(rf->mozembed, &req);
+
+					if (req.width < resize_pane_hsize-14)
+						w = resize_pane_hsize-14;
+					else
+						w = req.width;
+
+					gtk_widget_set_size_request(rf->mozembed,
+						w, req.height);
+				}
 			}
 		break;
 		default:
@@ -1857,7 +1868,7 @@ org_gnome_rss_browser (EMFormatHTML *efh, void *eb, EMFormatHTMLPObject *pobject
 #else
 	width = (int)(adj->page_size);
 #endif
-	gtk_widget_set_size_request(rf->mozembed, width-32, height);
+	gtk_widget_set_size_request(rf->mozembed, width-14, height);
 	po->sh_handler = g_signal_connect(adj,
 		"changed",
 		G_CALLBACK(rss_browser_set_hsize),



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