aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-01-26 19:53:42 -0600
committerTed Gould <ted@gould.cx>2012-01-26 19:53:42 -0600
commitd27208df523d669e2bf86ab0506634d0ae86e558 (patch)
treeb94869b89040e9c801dd17022a7580f2a588eea6 /libdbusmenu-gtk
parent95e56adc0d86cfbbc67f04582a230076721276d1 (diff)
downloadlibdbusmenu-d27208df523d669e2bf86ab0506634d0ae86e558.tar.gz
libdbusmenu-d27208df523d669e2bf86ab0506634d0ae86e558.tar.bz2
libdbusmenu-d27208df523d669e2bf86ab0506634d0ae86e558.zip
Only setting the accessible object name if it has been set
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r--libdbusmenu-gtk/client.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c
index 14c71ab..9888cbe 100644
--- a/libdbusmenu-gtk/client.c
+++ b/libdbusmenu-gtk/client.c
@@ -894,10 +894,13 @@ dbusmenu_gtkclient_newitem_base (DbusmenuGtkClient * client, DbusmenuMenuitem *
process_toggle_state(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE));
process_submenu(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY), client);
process_disposition(item, gmi, dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_DISPOSITION), client);
- atk_object_set_name(gtk_widget_get_accessible(GTK_WIDGET(gmi)),
- g_variant_get_string(dbusmenu_menuitem_property_get_variant(item, DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC), NULL));
refresh_shortcut(client, item);
+ const gchar * a11y_desc = dbusmenu_menuitem_property_get(item, DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC);
+ if (a11y_desc != NULL) {
+ atk_object_set_name(gtk_widget_get_accessible(GTK_WIDGET(gmi)), a11y_desc);
+ }
+
/* Oh, we're a child, let's deal with that */
if (parent != NULL) {
new_child(parent, item, dbusmenu_menuitem_get_position(item, parent), DBUSMENU_GTKCLIENT(client));