aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk
diff options
context:
space:
mode:
authorLuke Yelavich <luke.yelavich@canonical.com>2012-03-08 16:15:06 +1100
committerLuke Yelavich <luke.yelavich@canonical.com>2012-03-08 16:15:06 +1100
commit6d953d231b4d974d1c79e604e88b55c13499433d (patch)
tree5c83341cd865361fed8fe4c1622aa176251e0881 /libdbusmenu-gtk
parent357e0a1e969d2613b81f833a2936bcc71fc2470c (diff)
downloadlibdbusmenu-6d953d231b4d974d1c79e604e88b55c13499433d.tar.gz
libdbusmenu-6d953d231b4d974d1c79e604e88b55c13499433d.tar.bz2
libdbusmenu-6d953d231b4d974d1c79e604e88b55c13499433d.zip
Set the accessible name from the dbusmenu item label. THis is a work-around until GTK follows atk docs.
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r--libdbusmenu-gtk/client.c8
1 files changed, 8 insertions, 0 deletions
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;
}