[anjal] BUGFIX: GNOME Bugzilla #602796 - Mail window resizes to a wrong height.



commit b0f9261d0c8d1c718f58124b1883cb9fea8a3cbc
Author: Srinivasa Ragavan <sragavan gnome org>
Date:   Thu Dec 3 19:03:18 2009 +0530

    BUGFIX: GNOME Bugzilla #602796 - Mail window resizes to a wrong height.

 src/mail-message-view.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/mail-message-view.c b/src/mail-message-view.c
index 801fb1a..cb4aa38 100644
--- a/src/mail-message-view.c
+++ b/src/mail-message-view.c
@@ -690,7 +690,8 @@ mmv_finished_loading_webkit (WebKitWebView  *webkitwebview, WebKitWebFrame *arg1
 	gtk_widget_set_size_request ((GtkWidget *)webkitwebview, -1, webkit_web_frame_get_height(arg1));
 #endif	 
 	gtk_widget_size_request ((GtkWidget *)webkitwebview, &req);
-        gtk_widget_set_size_request ((GtkWidget *)webkitwebview, req.width, req.height);
+	if (req.height > 500) /* Wierd reason, but webkit resizes if we set a smaller size, before the content is loaded.*/
+        	gtk_widget_set_size_request ((GtkWidget *)webkitwebview, req.width, req.height+10);
 	/* Connect on expose, and mark mail as read on expose, when the mail is actually seen */
 	g_signal_connect (webkitwebview, "expose-event" , G_CALLBACK(mark_mail_read), mmview);
 	g_signal_emit (mmview, signals[MESSAGE_LOADED], 0);



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