[gtk+] Use _gtk_accessible_set_factory_type for GtkIconView
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Use _gtk_accessible_set_factory_type for GtkIconView
- Date: Thu, 17 Feb 2011 06:34:55 +0000 (UTC)
commit e757d1b2d28b5921736eef31cd61cd4e21074e8d
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Feb 17 01:30:33 2011 -0500
Use _gtk_accessible_set_factory_type for GtkIconView
gtk/gtkiconview.c | 25 ++++---------------------
1 files changed, 4 insertions(+), 21 deletions(-)
---
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index b3d4768..3b8e57e 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -23,6 +23,7 @@
#include <atk/atk.h>
+#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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]