aboutsummaryrefslogtreecommitdiff
path: root/tests/test-indicator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-indicator.cc')
-rw-r--r--tests/test-indicator.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test-indicator.cc b/tests/test-indicator.cc
index 5480774..824a5ac 100644
--- a/tests/test-indicator.cc
+++ b/tests/test-indicator.cc
@@ -29,6 +29,16 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
namespace
{
+ void quiet_log_func (const gchar *log_domain,
+ GLogLevelFlags log_level,
+ const gchar *message,
+ gpointer user_data)
+ {
+ // instantiating an indicator w/o a window causes lots
+ // of glib/gtk warnings... silence them so that they don't
+ // obscure any other warnings generated by the tests.
+ }
+
void ensure_glib_initialized ()
{
static bool initialized = false;
@@ -37,6 +47,8 @@ namespace
{
initialized = true;
g_type_init();
+ g_log_set_handler ("Gtk", (GLogLevelFlags)(G_LOG_LEVEL_CRITICAL|G_LOG_LEVEL_WARNING), quiet_log_func, NULL);
+ g_log_set_handler ("GLib-GObject", (GLogLevelFlags)(G_LOG_LEVEL_CRITICAL|G_LOG_LEVEL_WARNING), quiet_log_func, NULL);
}
}
}