[gtk+] Set an accessible name on menu buttons
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Set an accessible name on menu buttons
- Date: Fri, 20 Dec 2013 18:31:26 +0000 (UTC)
commit 2c007a869146cf307ea4b5b485a314e44f112e15
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Dec 20 09:05:43 2013 -0500
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 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkmenubutton.c b/gtk/gtkmenubutton.c
index 60573da..2ccb26e 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"));
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]