From c47f1eb8d8029c407dcc929c2575cdaa4a02cf2a Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 1 Mar 2005 18:02:16 +0000 Subject: [PATCH] * gtk/Container.custom (ChildType): fix this to just call gtk_container_child_type(). * gtk/glue/container.c (gtksharp_container_base_child_type): kill svn path=/trunk/gtk-sharp/; revision=41330 --- ChangeLog | 7 +++++++ doc/en/Gtk/Container.xml | 5 ++++- gtk/Container.custom | 6 +++--- gtk/glue/container.c | 14 -------------- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index ec9cb8ffe..0eda6a7d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-02-28 Dan Winship + + * gtk/Container.custom (ChildType): fix this to just call + gtk_container_child_type(). + + * gtk/glue/container.c (gtksharp_container_base_child_type): kill + 2005-02-28 Mike Kestner * glib/Idle.cs : add locking on the source_handlers. diff --git a/doc/en/Gtk/Container.xml b/doc/en/Gtk/Container.xml index a7e0d5b2a..8d8ee1885 100644 --- a/doc/en/Gtk/Container.xml +++ b/doc/en/Gtk/Container.xml @@ -600,7 +600,10 @@ Returns the type of children supported by this container. a - + + If you override this in a derived container class, you + must not call base.ChildType() from the overridden method. + diff --git a/gtk/Container.custom b/gtk/Container.custom index c2831e3c9..d015e3d08 100644 --- a/gtk/Container.custom +++ b/gtk/Container.custom @@ -156,8 +156,8 @@ protected virtual void ForAll (bool include_internals, CallbackInvoker invoker) gtksharp_container_base_forall (Handle, include_internals, invoker.Callback, invoker.Data); } -[DllImport("gtksharpglue-2")] -static extern IntPtr gtksharp_container_base_child_type(IntPtr raw); +[DllImport("libgtk-win32-2.0-0.dll")] +static extern IntPtr gtk_container_child_type(IntPtr raw); [DllImport("gtksharpglue-2")] static extern void gtksharp_container_override_child_type (GLib.GType type, ChildTypeDelegate cb); @@ -182,7 +182,7 @@ static void OverrideChildType (GLib.GType gtype) [GLib.DefaultSignalHandler (Type=typeof(Gtk.Container), ConnectionMethod="OverrideChildType")] public virtual GLib.GType ChildType() { - IntPtr raw_ret = gtksharp_container_base_child_type(Handle); + IntPtr raw_ret = gtk_container_child_type(Handle); GLib.GType ret = new GLib.GType(raw_ret); return ret; } diff --git a/gtk/glue/container.c b/gtk/glue/container.c index d7d9060ea..5a9c7efa7 100644 --- a/gtk/glue/container.c +++ b/gtk/glue/container.c @@ -58,20 +58,6 @@ gtksharp_container_invoke_gtk_callback (GtkCallback cb, GtkWidget *widget, gpoin cb (widget, data); } -GType gtksharp_container_base_child_type (GtkContainer *container); - -GType -gtksharp_container_base_child_type (GtkContainer *container) -{ - GtkContainerClass *parent = g_type_class_peek_parent (G_OBJECT_GET_CLASS (container)); - GType slot; - if (parent->child_type) - slot = (*parent->child_type) (container); - else - slot = G_TYPE_NONE; - return slot; -} - void gtksharp_container_override_child_type (GType gtype, gpointer cb); void