From 70b8f8f7efa049ec98092e08c0ef53a50aa52c14 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 6 Jul 2011 18:34:50 +0200 Subject: [PATCH] assistant: Use gtk_widget_class_set_accessible_type() Less code and no leaks! --- gtk/gtkassistant.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/gtk/gtkassistant.c b/gtk/gtkassistant.c index 6adbd8b521..8526efce91 100644 --- a/gtk/gtkassistant.c +++ b/gtk/gtkassistant.c @@ -150,8 +150,6 @@ static void gtk_assistant_get_child_property (GtkContainer *container, GValue *value, GParamSpec *pspec); -static AtkObject *gtk_assistant_get_accessible (GtkWidget *widget); - static void gtk_assistant_buildable_interface_init (GtkBuildableIface *iface); static GObject *gtk_assistant_buildable_get_internal_child (GtkBuildable *buildable, GtkBuilder *builder, @@ -171,6 +169,8 @@ static void gtk_assistant_buildable_custom_finished (GtkBuildable *bui static GList* find_page (GtkAssistant *assistant, GtkWidget *page); +GType _gtk_assistant_accessible_get_type (void); + enum { CHILD_PROP_0, @@ -213,7 +213,8 @@ gtk_assistant_class_init (GtkAssistantClass *class) widget_class->map = gtk_assistant_map; widget_class->unmap = gtk_assistant_unmap; widget_class->delete_event = gtk_assistant_delete_event; - widget_class->get_accessible = gtk_assistant_get_accessible; + + gtk_widget_class_set_accessible_type (widget_class, _gtk_assistant_accessible_get_type ()); container_class->add = gtk_assistant_add; container_class->remove = gtk_assistant_remove; @@ -2267,17 +2268,6 @@ _gtk_assistant_accessible_init (GtkAssistantAccessible *self) { } -static AtkObject * -gtk_assistant_get_accessible (GtkWidget *widget) -{ - AtkObject *obj; - - obj = (AtkObject*)g_object_new (_gtk_assistant_accessible_get_type (), NULL); - atk_object_initialize (obj, widget); - - return obj; -} - /* buildable implementation */ static GtkBuildableIface *parent_buildable_iface;