diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2012-03-21 16:11:25 -0400 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2012-03-21 16:11:25 -0400 |
commit | bac2284172b59de051a5a8cb74609faa3e9174a7 (patch) | |
tree | 3ef84c3ea33a0dbefa7ed24cc42b0f13931a04e2 /libdbusmenu-gtk/client.c | |
parent | 5995e81c8b6f794c22a6d1b3cf2a061868307de4 (diff) | |
parent | 268ede0deda25d0d868abee3cce4b0f9e15eb9aa (diff) | |
download | libdbusmenu-bac2284172b59de051a5a8cb74609faa3e9174a7.tar.gz libdbusmenu-bac2284172b59de051a5a8cb74609faa3e9174a7.tar.bz2 libdbusmenu-bac2284172b59de051a5a8cb74609faa3e9174a7.zip |
* New upstream release.
* Fix theme change bug (LP: #953509)
* Don't request event responses if no one is listening
* Fix a warning on custom menu items without labels
Diffstat (limited to 'libdbusmenu-gtk/client.c')
-rw-r--r-- | libdbusmenu-gtk/client.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 9cb1144..f507a56 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -738,24 +738,27 @@ process_a11y_desc (DbusmenuMenuitem * mi, GtkMenuItem * gmi, GVariant * variant, if (variant != NULL) { const gchar * setname = NULL; - setname = g_variant_dup_string(variant, NULL); + setname = g_variant_get_string(variant, NULL); atk_object_set_name(aobj, setname); } else { /* 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. */ - gchar * setname = NULL; const gchar * label = NULL; - /* 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); + if (label != NULL) { + gchar * setname = NULL; - atk_object_set_name(aobj, setname); - g_free(setname); + /* We don't want the underscore for mnewmonics */ + 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); + g_free(setname); + } } return; |