From e757d1b2d28b5921736eef31cd61cd4e21074e8d Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 17 Feb 2011 01:30:33 -0500 Subject: [PATCH] Use _gtk_accessible_set_factory_type for GtkIconView --- gtk/gtkiconview.c | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index b3d4768305..3b8e57e966 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -23,6 +23,7 @@ #include +#include "gtkaccessibleprivate.h" #include "gtkiconview.h" #include "gtkcelllayout.h" #include "gtkcellrenderer.h" @@ -9310,28 +9311,10 @@ gtk_icon_view_get_accessible (GtkWidget *widget) if (first_time) { - AtkObjectFactory *factory; - AtkRegistry *registry; - GType derived_type; - GType derived_atk_type; - - /* - * Figure out whether accessibility is enabled by looking at the - * type of the accessible object which would be created for - * the parent type of GtkIconView. - */ - derived_type = g_type_parent (GTK_TYPE_ICON_VIEW); - - registry = atk_get_default_registry (); - factory = atk_registry_get_factory (registry, - derived_type); - derived_atk_type = atk_object_factory_get_accessible_type (factory); - if (g_type_is_a (derived_atk_type, GTK_TYPE_ACCESSIBLE)) - atk_registry_set_factory_type (registry, - GTK_TYPE_ICON_VIEW, - gtk_icon_view_accessible_factory_get_type ()); + _gtk_accessible_set_factory_type (GTK_TYPE_ICON_VIEW, + gtk_icon_view_accessible_factory_get_type ()); first_time = FALSE; - } + } return GTK_WIDGET_CLASS (gtk_icon_view_parent_class)->get_accessible (widget); }