# HG changeset patch # User Mark Doliner # Date 1179817772 0 # Node ID 5033139b3eada7284ea615b80445303540191869 # Parent 61c5d8737f0170f4ee665e07fc6491ca9160ee80# Parent 9a649a04fd74f0191ba0bd6f9c4667e1ceceefcb merge of 'b8b81ea3c89a56d3526f1ca7373b947083c44a3f' and 'd483d375dbe8fca98d12114188e00790374a4092' diff -r 61c5d8737f01 -r 5033139b3ead libpurple/protocols/jabber/auth.c diff -r 61c5d8737f01 -r 5033139b3ead pidgin/gtkdebug.c --- a/pidgin/gtkdebug.c Tue May 22 05:22:36 2007 +0000 +++ b/pidgin/gtkdebug.c Tue May 22 07:09:32 2007 +0000 @@ -77,6 +77,7 @@ }; static DebugWindow *debug_win = NULL; +static guint debug_enabled_timer = 0; #ifdef HAVE_REGEX_H static void regex_filter_all(DebugWindow *win); @@ -864,14 +865,24 @@ return win; } +static gboolean +debug_enabled_timeout_cb(gpointer data) +{ + debug_enabled_timer = 0; + + if (data) + pidgin_debug_window_show(); + else + pidgin_debug_window_hide(); + + return FALSE; +} + static void debug_enabled_cb(const char *name, PurplePrefType type, gconstpointer value, gpointer data) { - if (value) - pidgin_debug_window_show(); - else - pidgin_debug_window_hide(); + debug_enabled_timer = g_timeout_add(0, debug_enabled_timeout_cb, GINT_TO_POINTER(GPOINTER_TO_INT(value))); } static void @@ -984,6 +995,9 @@ pidgin_debug_uninit(void) { purple_debug_set_ui_ops(NULL); + + if (debug_enabled_timer != 0) + g_source_remove(debug_enabled_timer); } void