From 6d953d231b4d974d1c79e604e88b55c13499433d Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Thu, 8 Mar 2012 16:15:06 +1100 Subject: Set the accessible name from the dbusmenu item label. THis is a work-around until GTK follows atk docs. --- libdbusmenu-gtk/client.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libdbusmenu-gtk') diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 1883eea..4c3f1c2 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -741,6 +741,14 @@ process_a11y_desc (DbusmenuMenuitem * mi, GtkMenuItem * gmi, GVariant * variant, setname = g_variant_get_string(variant, NULL); } + /* The atk docs advise to set the name of the atk object to an empty + * string, but GTK doesn't yet do the same, and setting the name to NULL + * causes tests to fail. + */ + if (setname == NULL) { + setname = dbusmenu_menuitem_property_get(mi, DBUSMENU_MENUITEM_PROP_LABEL); + } + atk_object_set_name(aobj, setname); return; } -- cgit v1.2.3