changeset 15639:233c4a2f7b77

Suppress debug messages from libgnt.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 15 Feb 2007 19:25:28 +0000
parents 37d9f44c7de1
children 35fa1d1c4ef2
files console/gntdebug.c console/gntgaim.c console/libgnt/gntbindable.h
diffstat 3 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/console/gntdebug.c	Thu Feb 15 18:59:16 2007 +0000
+++ b/console/gntdebug.c	Thu Feb 15 19:25:28 2007 +0000
@@ -135,6 +135,10 @@
 }
 
 static void
+suppress_error_messages(const char *message)
+{}
+
+static void
 toggle_pause(GntWidget *w, gpointer n)
 {
 	debug.paused = !debug.paused;
@@ -283,6 +287,7 @@
 	REGISTER_G_LOG_HANDLER("GThread");
 
 	g_set_print_handler(print_stderr);   /* Redirect the debug messages to stderr */
+	g_set_printerr_handler(suppress_error_messages);
 
 	gaim_prefs_add_none(PREF_ROOT);
 	gaim_prefs_add_none(PREF_ROOT "/size");
--- a/console/gntgaim.c	Thu Feb 15 18:59:16 2007 +0000
+++ b/console/gntgaim.c	Thu Feb 15 19:25:28 2007 +0000
@@ -396,9 +396,6 @@
 
 int main(int argc, char **argv)
 {
-	/* XXX: Don't puke */
-	freopen(".error", "w", stderr);
-
 	signal(SIGPIPE, SIG_IGN);
 
 	/* Initialize the libgaim stuff */
--- a/console/libgnt/gntbindable.h	Thu Feb 15 18:59:16 2007 +0000
+++ b/console/libgnt/gntbindable.h	Thu Feb 15 19:25:28 2007 +0000
@@ -13,7 +13,7 @@
 #define GNT_IS_BINDABLE_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_BINDABLE))
 #define GNT_BINDABLE_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_BINDABLE, GntBindableClass))
 
-#define	GNTDEBUG	fprintf(stderr, "%s\n", __FUNCTION__)
+#define	GNTDEBUG	g_printerr("%s\n", __FUNCTION__)
 
 typedef struct _GnBindable			GntBindable;
 typedef struct _GnBindableClass		GntBindableClass;