diff options
author | Matthias Clasen <mclasen@redhat.com> | 2011-02-17 01:32:24 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-02-17 01:32:24 -0500 |
commit | 221415f71fd8975f57f5b7b114046cbe929fca1b (patch) | |
tree | 5dd4b08215207f7f6f08fdb29a7dba6c97c72e4c /gtk/gtkswitch.c | |
parent | e757d1b2d28b5921736eef31cd61cd4e21074e8d (diff) | |
download | gtk+-221415f71fd8975f57f5b7b114046cbe929fca1b.tar.gz |
Use _gtk_accessible_set_factory_type in GtkSwitch
Diffstat (limited to 'gtk/gtkswitch.c')
-rw-r--r-- | gtk/gtkswitch.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c index 6b9866e167..62cffcdea9 100644 --- a/gtk/gtkswitch.c +++ b/gtk/gtkswitch.c @@ -40,7 +40,7 @@ #include "gtkswitch.h" -#include "gtkaccessible.h" +#include "gtkaccessibleprivate.h" #include "gtkactivatable.h" #include "gtkintl.h" #include "gtkstyle.h" @@ -601,25 +601,8 @@ gtk_switch_get_accessible (GtkWidget *widget) if (G_UNLIKELY (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 GtkSwitch - */ - derived_type = g_type_parent (GTK_TYPE_SWITCH); - - 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_SWITCH, - gtk_switch_accessible_factory_get_type ()); - + _gtk_accessible_set_factory_type (GTK_TYPE_SWITCH, + gtk_switch_accessible_factory_get_type ()); first_time = FALSE; } |