From 609383f93c6b695ac36ef5f7473dc440eff50361 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 17 Jul 2020 12:42:24 -0400 Subject: [PATCH] testatcontext: Print role nicks This makes for easier reading. --- gtk/gtktestatcontext.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gtk/gtktestatcontext.c b/gtk/gtktestatcontext.c index 550e49d958..61dc5780a3 100644 --- a/gtk/gtktestatcontext.c +++ b/gtk/gtktestatcontext.c @@ -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);