aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk
diff options
context:
space:
mode:
authorLuke Yelavich <luke.yelavich@canonical.com>2012-03-09 11:30:43 +1100
committerLuke Yelavich <luke.yelavich@canonical.com>2012-03-09 11:30:43 +1100
commit004ede5cfbcab69652857f0d25d7ddab5bfe0b23 (patch)
tree51ef67f10b4a20ddb810cfac384759bb8966c934 /libdbusmenu-gtk
parentfb882190fdbbb108b101795fedc7bc22dfa65e99 (diff)
downloadlibdbusmenu-004ede5cfbcab69652857f0d25d7ddab5bfe0b23.tar.gz
libdbusmenu-004ede5cfbcab69652857f0d25d7ddab5bfe0b23.tar.bz2
libdbusmenu-004ede5cfbcab69652857f0d25d7ddab5bfe0b23.zip
Remove the underscores used for mnewmonics, as orca speaks them, which is not
what we want.
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r--libdbusmenu-gtk/client.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c
index 4c3f1c2..95d6b8b 100644
--- a/libdbusmenu-gtk/client.c
+++ b/libdbusmenu-gtk/client.c
@@ -736,6 +736,7 @@ process_a11y_desc (DbusmenuMenuitem * mi, GtkMenuItem * gmi, GVariant * variant,
}
const gchar * setname = NULL;
+ const gchar * label = NULL;
if (variant != NULL) {
setname = g_variant_get_string(variant, NULL);
@@ -746,7 +747,12 @@ process_a11y_desc (DbusmenuMenuitem * mi, GtkMenuItem * gmi, GVariant * variant,
* causes tests to fail.
*/
if (setname == NULL) {
- setname = dbusmenu_menuitem_property_get(mi, DBUSMENU_MENUITEM_PROP_LABEL);
+ /* We don't want the underscore for mnewmonics */
+ label = dbusmenu_menuitem_property_get(mi, DBUSMENU_MENUITEM_PROP_LABEL);
+
+ GRegex * regex = g_regex_new ("_", 0, 0, NULL);
+ setname = g_regex_replace_literal (regex, label, -1, 0, "", 0, NULL);
+ g_regex_unref(regex);
}
atk_object_set_name(aobj, setname);