From: <sa...@us...> - 2006-10-12 01:03:20
|
Revision: 17463 http://svn.sourceforge.net/gaim/?rev=17463&view=rev Author: sadrul Date: 2006-10-11 18:03:18 -0700 (Wed, 11 Oct 2006) Log Message: ----------- Show the glib-errors/warnings in the debug window. Modified Paths: -------------- trunk/console/gntdebug.c Modified: trunk/console/gntdebug.c =================================================================== --- trunk/console/gntdebug.c 2006-10-12 01:02:07 UTC (rev 17462) +++ trunk/console/gntdebug.c 2006-10-12 01:03:18 UTC (rev 17463) @@ -145,6 +145,52 @@ gaim_prefs_set_bool("/core/debug/timestamps", debug.timestamps); } +/* Xerox */ +static void +gaim_glib_log_handler(const gchar *domain, GLogLevelFlags flags, + const gchar *msg, gpointer user_data) +{ + GaimDebugLevel level; + char *new_msg = NULL; + char *new_domain = NULL; + + if ((flags & G_LOG_LEVEL_ERROR) == G_LOG_LEVEL_ERROR) + level = GAIM_DEBUG_ERROR; + else if ((flags & G_LOG_LEVEL_CRITICAL) == G_LOG_LEVEL_CRITICAL) + level = GAIM_DEBUG_FATAL; + else if ((flags & G_LOG_LEVEL_WARNING) == G_LOG_LEVEL_WARNING) + level = GAIM_DEBUG_WARNING; + else if ((flags & G_LOG_LEVEL_MESSAGE) == G_LOG_LEVEL_MESSAGE) + level = GAIM_DEBUG_INFO; + else if ((flags & G_LOG_LEVEL_INFO) == G_LOG_LEVEL_INFO) + level = GAIM_DEBUG_INFO; + else if ((flags & G_LOG_LEVEL_DEBUG) == G_LOG_LEVEL_DEBUG) + level = GAIM_DEBUG_MISC; + else + { + gaim_debug_warning("gntdebug", + "Unknown glib logging level in %d\n", flags); + + level = GAIM_DEBUG_MISC; /* This will never happen. */ + } + + if (msg != NULL) + new_msg = gaim_utf8_try_convert(msg); + + if (domain != NULL) + new_domain = gaim_utf8_try_convert(domain); + + if (new_msg != NULL) + { + gaim_debug(level, (new_domain != NULL ? new_domain : "g_log"), + "%s\n", new_msg); + + g_free(new_msg); + } + + g_free(new_domain); +} + void gg_debug_window_show() { debug.paused = false; @@ -207,6 +253,19 @@ void gg_debug_init() { +/* Xerox */ +#define REGISTER_G_LOG_HANDLER(name) \ + g_log_set_handler((name), G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL \ + | G_LOG_FLAG_RECURSION, \ + gaim_glib_log_handler, NULL) + + /* Register the glib log handlers. */ + REGISTER_G_LOG_HANDLER(NULL); + REGISTER_G_LOG_HANDLER("GLib"); + REGISTER_G_LOG_HANDLER("GModule"); + REGISTER_G_LOG_HANDLER("GLib-GObject"); + REGISTER_G_LOG_HANDLER("GThread"); + g_set_print_handler(print_stderr); /* Redirect the debug messages to stderr */ if (gaim_debug_is_enabled()) g_timeout_add(0, start_with_debugwin, NULL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-10-12 03:30:32
|
Revision: 17467 http://svn.sourceforge.net/gaim/?rev=17467&view=rev Author: sadrul Date: 2006-10-11 20:30:25 -0700 (Wed, 11 Oct 2006) Log Message: ----------- Yet another patch from Richard Nelson (wabz). This makes the checkboxes in the debug window vertically centered. Modified Paths: -------------- trunk/console/gntdebug.c Modified: trunk/console/gntdebug.c =================================================================== --- trunk/console/gntdebug.c 2006-10-12 03:26:33 UTC (rev 17466) +++ trunk/console/gntdebug.c 2006-10-12 03:30:25 UTC (rev 17467) @@ -211,6 +211,7 @@ box = gnt_hbox_new(FALSE); gnt_box_set_alignment(GNT_BOX(box), GNT_ALIGN_MID); + gnt_box_set_fill(GNT_BOX(box), FALSE); /* XXX: Setting the GROW_Y for the following widgets don't make sense. But right now * it's necessary to make the width of the debug window resizable ... like I said, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2006-10-28 23:55:38
|
Revision: 17613 http://svn.sourceforge.net/gaim/?rev=17613&view=rev Author: sadrul Date: 2006-10-28 16:55:29 -0700 (Sat, 28 Oct 2006) Log Message: ----------- Fix bug #1586377. Modified Paths: -------------- trunk/console/gntdebug.c Modified: trunk/console/gntdebug.c =================================================================== --- trunk/console/gntdebug.c 2006-10-28 22:14:52 UTC (rev 17612) +++ trunk/console/gntdebug.c 2006-10-28 23:55:29 UTC (rev 17613) @@ -193,7 +193,7 @@ void gg_debug_window_show() { - debug.paused = false; + debug.paused = FALSE; debug.timestamps = gaim_prefs_get_bool("/core/debug/timestamps"); if (debug.window == NULL) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |