[gtk+] assistant: Use gtk_widget_class_set_accessible_type()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] assistant: Use gtk_widget_class_set_accessible_type()
- Date: Wed, 6 Jul 2011 16:47:12 +0000 (UTC)
commit 70b8f8f7efa049ec98092e08c0ef53a50aa52c14
Author: Benjamin Otte <otte redhat com>
Date: Wed Jul 6 18:34:50 2011 +0200
assistant: Use gtk_widget_class_set_accessible_type()
Less code and no leaks!
gtk/gtkassistant.c | 18 ++++--------------
1 files changed, 4 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtkassistant.c b/gtk/gtkassistant.c
index 6adbd8b..8526efc 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]