[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-app-devel
Subject:    RE: disable console output
From:       martyn.2.russell () bt ! com
Date:       2003-07-29 9:23:06
[Download RAW message or body]

> how can I suppress the WARNING outputs from libglade?
> 
> I tried 'g_log_set_handler', but that affected only my g_warning()
> calls.
> 
> The nasty output from libglade (e. g.
> (main.exe:3108): libglade-WARNING **: could not find signal handler
> 'on_save1_activate'.)
> remains.

You need to set the log handler in GTK to call a callback you specify.  That
way you can print it or ignore it.

You can do it like this:

	g_log_set_handler("libglade", 
	  	    G_LOG_LEVEL_INFO | G_LOG_LEVEL_MESSAGE |
G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL, 
		    my_log_handler_cb, 
		    NULL);


	void my_log_handler_cb(const gchar *log_domain, GLogLevelFlags
log_level, const gchar *message, gpointer user_data)
	{
		return;
	}

Regards,
Martyn
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic