/pidgin/main: bbfcd01c57b8: Fix filtering in debug window for We...

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Mon Aug 6 11:47:58 EDT 2012


Changeset: bbfcd01c57b8e6a2ccef40199e62eccfb920902c
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2012-08-06 17:47 +0200
Branch:	 default
URL: http://hg.pidgin.im/pidgin/main/rev/bbfcd01c57b8

Description:

Fix filtering in debug window for WebKitGtk

diffstat:

 pidgin/gtkdebug.c |  13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diffs (23 lines):

diff --git a/pidgin/gtkdebug.c b/pidgin/gtkdebug.c
--- a/pidgin/gtkdebug.c
+++ b/pidgin/gtkdebug.c
@@ -990,7 +990,18 @@ pidgin_debug_print(PurpleDebugLevel leve
 	g_free(esc_s);
 	g_free(tmp);
 
-	gtk_webview_append_html(GTK_WEBVIEW(debug_win->text), s);
+	//XXX: gtk_webview_append_html does delayed insert of new div, which is
+	//     needed by filtering below
+	//gtk_webview_append_html(GTK_WEBVIEW(debug_win->text), s);
+	{
+		WebKitDOMDocument *dom = NULL;
+		WebKitDOMHTMLElement *body = NULL;
+		dom = webkit_web_view_get_dom_document(WEBKIT_WEB_VIEW(debug_win->text));
+		if (dom)
+			body = webkit_dom_document_get_body(dom);
+		if (body)
+			webkit_dom_html_element_insert_adjacent_html(body, "beforeend", s, NULL);
+	}
 
 	if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(debug_win->filter))) {
 		WebKitDOMDocument *dom = NULL;



More information about the Commits mailing list