From 2c007a869146cf307ea4b5b485a314e44f112e15 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 20 Dec 2013 09:05:43 -0500 Subject: [PATCH] Set an accessible name on menu buttons These commonly have just an image in them, so lets at least call them 'Menu'. --- gtk/gtkmenubutton.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gtk/gtkmenubutton.c b/gtk/gtkmenubutton.c index 60573dacc1..2ccb26e0ac 100644 --- a/gtk/gtkmenubutton.c +++ b/gtk/gtkmenubutton.c @@ -148,6 +148,7 @@ #include "gtktypebuiltins.h" #include "gtkwindow.h" #include "gtkmain.h" +#include "gtkaccessible.h" #include "gtkprivate.h" #include "gtkintl.h" @@ -578,6 +579,7 @@ static void gtk_menu_button_init (GtkMenuButton *menu_button) { GtkMenuButtonPrivate *priv; + AtkObject *accessible; priv = gtk_menu_button_get_instance_private (menu_button); menu_button->priv = priv; @@ -586,6 +588,10 @@ gtk_menu_button_init (GtkMenuButton *menu_button) add_arrow (menu_button); gtk_widget_set_sensitive (GTK_WIDGET (menu_button), FALSE); + + accessible = gtk_widget_get_accessible (GTK_WIDGET (menu_button)); + if (GTK_IS_ACCESSIBLE (accessible)) + atk_object_set_name (accessible, _("Menu")); } /**