aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-03-08 10:45:03 -0600
committerTed Gould <ted@gould.cx>2012-03-08 10:45:03 -0600
commitfb882190fdbbb108b101795fedc7bc22dfa65e99 (patch)
tree31ebe63657fd0631e7116ec30eedb89a2a4c60ac
parent1f223542ce9a8ae00d17928bd91e244793a76c24 (diff)
parent6d953d231b4d974d1c79e604e88b55c13499433d (diff)
downloadlibdbusmenu-fb882190fdbbb108b101795fedc7bc22dfa65e99.tar.gz
libdbusmenu-fb882190fdbbb108b101795fedc7bc22dfa65e99.tar.bz2
libdbusmenu-fb882190fdbbb108b101795fedc7bc22dfa65e99.zip
Making sure the ATK object name always gets set to the label if nothing else
-rw-r--r--libdbusmenu-gtk/client.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c
index 830356a..4c3f1c2 100644
--- a/libdbusmenu-gtk/client.c
+++ b/libdbusmenu-gtk/client.c
@@ -741,8 +741,12 @@ 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 = "";
+ setname = dbusmenu_menuitem_property_get(mi, DBUSMENU_MENUITEM_PROP_LABEL);
}
atk_object_set_name(aobj, setname);