[libpeas] Do not abort if a warning occurs during testing_show_widget()
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Do not abort if a warning occurs during testing_show_widget()
- Date: Thu, 14 Feb 2013 12:03:06 +0000 (UTC)
commit ffd54f79bdb71d8a5ddcd96259ddf727a183901e
Author: Garrett Regier <garrettregier gmail com>
Date: Thu Feb 14 03:38:19 2013 -0800
Do not abort if a warning occurs during testing_show_widget()
tests/libpeas-gtk/testing/testing.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/tests/libpeas-gtk/testing/testing.c b/tests/libpeas-gtk/testing/testing.c
index f95d4b9..7a5d2ea 100644
--- a/tests/libpeas-gtk/testing/testing.c
+++ b/tests/libpeas-gtk/testing/testing.c
@@ -136,6 +136,7 @@ void
testing_show_widget (gpointer widget)
{
GtkWidget *window;
+ GLogFunc orig_log_handler;
g_assert (GTK_IS_WIDGET (widget));
@@ -160,5 +161,10 @@ testing_show_widget (gpointer widget)
G_CALLBACK (delete_event_cb),
widget);
+ /* Do not abort if a warning occurs while running the widget */
+ orig_log_handler = g_log_set_default_handler (g_log_default_handler, NULL);
+
gtk_main ();
+
+ g_log_set_default_handler (orig_log_handler, NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]