toolbar: Use gtk_widget_class_set_accessible_role()

This commit is contained in:
Benjamin Otte 2011-07-18 18:12:06 +02:00
parent 96245d4efb
commit 9c30ae02ee
2 changed files with 3 additions and 4 deletions

View File

@ -164,10 +164,7 @@ gtk_container_accessible_real_initialize (AtkObject *obj,
g_signal_connect (data, "add", G_CALLBACK (gtk_container_accessible_add_gtk), obj);
g_signal_connect (data, "remove", G_CALLBACK (gtk_container_accessible_remove_gtk), obj);
if (GTK_IS_TOOLBAR (data))
obj->role = ATK_ROLE_TOOL_BAR;
else
obj->role = ATK_ROLE_PANEL;
obj->role = ATK_ROLE_PANEL;
}
static void

View File

@ -381,6 +381,8 @@ gtk_toolbar_class_init (GtkToolbarClass *klass)
widget_class->style_updated = gtk_toolbar_style_updated;
widget_class->focus = gtk_toolbar_focus;
gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_TOOL_BAR);
/* need to override the base class function via override_class_handler,
* because the signal slot is not available in GtkWidgetClass
*/