forked from AuroraMiddleware/gtk
Use _gtk_accessible_set_factory_type for GtkIconView
This commit is contained in:
parent
9d321437b6
commit
e757d1b2d2
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include <atk/atk.h>
|
#include <atk/atk.h>
|
||||||
|
|
||||||
|
#include "gtkaccessibleprivate.h"
|
||||||
#include "gtkiconview.h"
|
#include "gtkiconview.h"
|
||||||
#include "gtkcelllayout.h"
|
#include "gtkcelllayout.h"
|
||||||
#include "gtkcellrenderer.h"
|
#include "gtkcellrenderer.h"
|
||||||
@ -9310,28 +9311,10 @@ gtk_icon_view_get_accessible (GtkWidget *widget)
|
|||||||
|
|
||||||
if (first_time)
|
if (first_time)
|
||||||
{
|
{
|
||||||
AtkObjectFactory *factory;
|
_gtk_accessible_set_factory_type (GTK_TYPE_ICON_VIEW,
|
||||||
AtkRegistry *registry;
|
gtk_icon_view_accessible_factory_get_type ());
|
||||||
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 ());
|
|
||||||
first_time = FALSE;
|
first_time = FALSE;
|
||||||
}
|
}
|
||||||
return GTK_WIDGET_CLASS (gtk_icon_view_parent_class)->get_accessible (widget);
|
return GTK_WIDGET_CLASS (gtk_icon_view_parent_class)->get_accessible (widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user