tearoffmenuitem: Use gtk_widget_class_set_accessible_role()

This commit is contained in:
Benjamin Otte 2011-07-18 18:07:43 +02:00
parent 480b5862d4
commit d9bfa563d0
2 changed files with 3 additions and 4 deletions

View File

@ -65,10 +65,7 @@ gtk_menu_item_accessible_initialize (AtkObject *obj,
GTK_WIDGET_ACCESSIBLE (obj)->layer = ATK_LAYER_POPUP;
if (GTK_IS_TEAROFF_MENU_ITEM (data))
obj->role = ATK_ROLE_TEAR_OFF_MENU_ITEM;
else
obj->role = ATK_ROLE_MENU_ITEM;
obj->role = ATK_ROLE_MENU_ITEM;
}
static gint

View File

@ -103,6 +103,8 @@ gtk_tearoff_menu_item_class_init (GtkTearoffMenuItemClass *klass)
widget_class->get_preferred_height = gtk_tearoff_menu_item_get_preferred_height;
widget_class->parent_set = gtk_tearoff_menu_item_parent_set;
gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_TEAR_OFF_MENU_ITEM);
menu_item_class->activate = gtk_tearoff_menu_item_activate;
g_type_class_add_private (klass, sizeof (GtkTearoffMenuItemPrivate));