testatcontext: Print role nicks

This makes for easier reading.
This commit is contained in:
Matthias Clasen 2020-07-17 12:42:24 -04:00 committed by Emmanuele Bassi
parent a9e0cf77a0
commit 609383f93c

View File

@ -56,15 +56,21 @@ gtk_test_at_context_state_change (GtkATContext *self,
char *relations_str = gtk_accessible_attribute_set_to_string (relations);
GTK_NOTE(A11Y,
g_print ("*** Accessible state changed for accessible “%s”, with role %d:\n"
{
GEnumClass *class = g_type_class_ref (GTK_TYPE_ACCESSIBLE_ROLE);
GEnumValue *value = g_enum_get_value (class, role);
g_print ("*** Accessible state changed for accessible “%s”, with role “%s” (%d):\n"
"*** states = %s\n"
"*** properties = %s\n"
"*** relations = %s\n",
G_OBJECT_TYPE_NAME (accessible),
value->value_nick,
role,
states_str,
properties_str,
relations_str));
relations_str);
g_type_class_unref (class);
});
g_free (states_str);
g_free (properties_str);