summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2011-07-18 18:12:06 +0200
committerBenjamin Otte <otte@gnome.org>2011-07-18 18:30:50 +0200
commit9c30ae02ee0319755105732b968e9f1be55e2061 (patch)
tree0248f0a26c13dae4ddec5106ccd3a3f981052fa7
parent96245d4efb7c0b1dfbd9e7673fe4f4c4b6efb2e6 (diff)
downloadgtk+-9c30ae02ee0319755105732b968e9f1be55e2061.tar.gz
toolbar: Use gtk_widget_class_set_accessible_role()
-rw-r--r--gtk/a11y/gtkcontaineraccessible.c5
-rw-r--r--gtk/gtktoolbar.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/gtk/a11y/gtkcontaineraccessible.c b/gtk/a11y/gtkcontaineraccessible.c
index ae01adc87a..71f35d09d0 100644
--- a/gtk/a11y/gtkcontaineraccessible.c
+++ b/gtk/a11y/gtkcontaineraccessible.c
@@ -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
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index 737a5f065a..d9f93fc8b4 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -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
*/