testatcontext: Use the new debug flag

Only dump a11y state if GTK_DEBUG=accessibility is set.
This commit is contained in:
Matthias Clasen
2020-07-17 10:36:43 -04:00
parent a202322610
commit 4f09905814

View File

@@ -24,6 +24,8 @@
#include "gtkatcontextprivate.h"
#include "gtkenums.h"
#include "gtkprivate.h"
#include "gtkdebug.h"
struct _GtkTestATContext
{
@@ -47,15 +49,16 @@ gtk_test_at_context_state_change (GtkATContext *self,
char *properties_str = gtk_accessible_attribute_set_to_string (properties);
char *relations_str = gtk_accessible_attribute_set_to_string (relations);
g_print ("*** Accessible state changed for accessible “%s”, with role %d:\n"
"*** states = %s\n"
"*** properties = %s\n"
"*** relations = %s\n",
G_OBJECT_TYPE_NAME (accessible),
role,
states_str,
properties_str,
relations_str);
GTK_NOTE(A11Y,
g_print ("*** Accessible state changed for accessible “%s”, with role %d:\n"
"*** states = %s\n"
"*** properties = %s\n"
"*** relations = %s\n",
G_OBJECT_TYPE_NAME (accessible),
role,
states_str,
properties_str,
relations_str));
g_free (states_str);
g_free (properties_str);