/pidgin/main: e05551721abf: Obey the filter level when the Debug...

Elliott Sales de Andrade qulogic at pidgin.im
Tue Jul 24 04:03:44 EDT 2012


Changeset: e05551721abffe98f23ce1e49db5a3cad30cb633
Author:	 Elliott Sales de Andrade <qulogic at pidgin.im>
Date:	 2012-07-22 23:40 -0400
Branch:	 default
URL: http://hg.pidgin.im/pidgin/main/rev/e05551721abf

Description:

Obey the filter level when the Debug Window is first opened.

diffstat:

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

diffs (36 lines):

diff --git a/pidgin/gtkdebug.c b/pidgin/gtkdebug.c
--- a/pidgin/gtkdebug.c
+++ b/pidgin/gtkdebug.c
@@ -74,7 +74,7 @@
 	/* Regex */ \
 	"div.hide{display:none;}" \
 	"span.regex{background-color:#ffafaf;font-weight:bold;}" \
-	"</style></head></html>"
+	"</style></head><body class=l%d></body></html>"
 
 static DebugWindow *debug_win = NULL;
 static guint debug_enabled_timer = 0;
@@ -152,7 +152,13 @@
 static void
 clear_cb(GtkWidget *w, DebugWindow *win)
 {
-	gtk_webview_load_html_string(GTK_WEBVIEW(win->text), EMPTY_HTML);
+	char *tmp;
+	int level;
+
+	level = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/debug/filterlevel");
+	tmp = g_strdup_printf(EMPTY_HTML, level);
+	gtk_webview_load_html_string(GTK_WEBVIEW(win->text), tmp);
+	g_free(tmp);
 }
 
 static void
@@ -817,7 +823,7 @@
 	gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
 	gtk_widget_show(frame);
 
-	gtk_webview_load_html_string(GTK_WEBVIEW(win->text), EMPTY_HTML);
+	clear_cb(NULL, win);
 
 	gtk_widget_show_all(win->window);
 



More information about the Commits mailing list