[gtk+/font-chooser] menubar: Use gtk_widget_class_set_accessible_role()
- From: Alberto Ruiz <aruiz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/font-chooser] menubar: Use gtk_widget_class_set_accessible_role()
- Date: Wed, 20 Jul 2011 20:20:03 +0000 (UTC)
commit f3a8849324c9a7bae9898c19ceaaaa7ad3447cdb
Author: Benjamin Otte <otte gnome org>
Date: Mon Jul 18 18:14:00 2011 +0200
menubar: Use gtk_widget_class_set_accessible_role()
gtk/a11y/gtkmenushellaccessible.c | 5 +----
gtk/gtkmenubar.c | 2 ++
2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gtk/a11y/gtkmenushellaccessible.c b/gtk/a11y/gtkmenushellaccessible.c
index 5cdf71e..3bebe79 100644
--- a/gtk/a11y/gtkmenushellaccessible.c
+++ b/gtk/a11y/gtkmenushellaccessible.c
@@ -34,10 +34,7 @@ gtk_menu_shell_accessible_initialize (AtkObject *accessible,
{
ATK_OBJECT_CLASS (_gtk_menu_shell_accessible_parent_class)->initialize (accessible, data);
- if (GTK_IS_MENU_BAR (data))
- accessible->role = ATK_ROLE_MENU_BAR;
- else
- accessible->role = ATK_ROLE_UNKNOWN;
+ accessible->role = ATK_ROLE_UNKNOWN;
}
static void
diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c
index c54bc79..428cf51 100644
--- a/gtk/gtkmenubar.c
+++ b/gtk/gtkmenubar.c
@@ -130,6 +130,8 @@ gtk_menu_bar_class_init (GtkMenuBarClass *class)
widget_class->draw = gtk_menu_bar_draw;
widget_class->hierarchy_changed = gtk_menu_bar_hierarchy_changed;
+ gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_MENU_BAR);
+
menu_shell_class->submenu_placement = GTK_TOP_BOTTOM;
menu_shell_class->get_popup_delay = gtk_menu_bar_get_popup_delay;
menu_shell_class->move_current = gtk_menu_bar_move_current;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]