[evolution-rss] prevent destroying browser's parent window it seems webkit crashes if it's parent window is destroye



commit e3c21f98e3d8b04c1ff7bffdd3620e0ee7eb531a
Author: Lucian Langa <lucilanga gnome org>
Date:   Tue Jul 20 19:49:54 2010 +0300

    prevent destroying browser's parent window
    it seems webkit crashes if it's parent window is destroyed first

 src/rss.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/rss.c b/src/rss.c
index 21a6610..3028407 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -1735,7 +1735,6 @@ org_gnome_rss_browser (EMFormatHTML *efh, void *eb, EMFormatHTMLPObject *pobject
 	}
 #endif
 
-	po->container = rf->mozembed;
 #if (DATASERVER_VERSION >= 2031002)
 	online =  camel_session_get_online (session);
 #else
@@ -1774,7 +1773,9 @@ org_gnome_rss_browser (EMFormatHTML *efh, void *eb, EMFormatHTMLPObject *pobject
 		gtk_widget_show_all(rf->mozembed);
 
 	gtk_container_add ((GtkContainer *) eb, rf->mozembed);
-	g_object_ref(rf->mozembed);
+	//appears distroying webkit's parent window results in crash
+	g_object_ref(eb);
+	po->container = eb;
 	rf->headers_mode = myf->mode;
 
 #if EVOLUTION_VERSION >= 23103
@@ -2003,7 +2004,7 @@ free_rss_browser(EMFormatHTMLPObject *o)
 					GTK_WIDGET(po->format->html)));
 #endif
 	g_signal_handler_disconnect(adj, po->sh_handler);
-	gtk_widget_destroy(po->container);
+	g_object_unref(po->container);
 	g_free(po->website);
 	browser_fetching = 0;
 }



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