From b651056f6cb68b62202ef795fd950cc523e5e80f Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Fri, 30 May 2008 17:17:16 +0000 Subject: [PATCH] 2008-05-30 Mike Kestner * gtk/Object.custom: * gtk/glue/object.c: remove the destroy override. it doesn't work. svn path=/trunk/gtk-sharp/; revision=104558 --- ChangeLog | 5 +++++ gtk/Object.custom | 24 ------------------------ gtk/glue/object.c | 22 ---------------------- 3 files changed, 5 insertions(+), 46 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad330e793..196f99eed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-30 Mike Kestner + + * gtk/Object.custom: + * gtk/glue/object.c: remove the destroy override. it doesn't work. + 2008-05-28 Mike Kestner * gtk/Object.custom: move Dispose call to a vm override so that diff --git a/gtk/Object.custom b/gtk/Object.custom index 9ba683143..d1a2a1511 100755 --- a/gtk/Object.custom +++ b/gtk/Object.custom @@ -21,30 +21,6 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport("gtksharpglue-2")] - private static extern bool gtksharp_object_override_destroy (DestroyVMDelegate handler); - - static DestroyVMDelegate destroy_vm_handler; - - static Object () - { - destroy_vm_handler = new DestroyVMDelegate (DestroyVMCallback); - gtksharp_object_override_destroy (destroy_vm_handler); - } - - [GLib.CDeclCallback] - delegate void DestroyVMDelegate (IntPtr handle); - - static void DestroyVMCallback (IntPtr handle) - { - try { - GLib.Object obj = GLib.Object.GetObject (handle, false); - if (obj != null) - obj.Dispose (); - } catch (Exception) { - } - } - static Hashtable destroy_handlers; static Hashtable DestroyHandlers { get { diff --git a/gtk/glue/object.c b/gtk/glue/object.c index c5518e406..489bad48d 100644 --- a/gtk/glue/object.c +++ b/gtk/glue/object.c @@ -26,7 +26,6 @@ void gtksharp_object_unref_if_floating (GObject *obj); gboolean gtksharp_object_is_floating (GObject *obj); void gtksharp_object_set_floating (GtkObject *obj, gboolean val); -void gtksharp_object_override_destroy (gpointer cb); /* */ void @@ -51,24 +50,3 @@ gtksharp_object_set_floating (GtkObject *obj, gboolean val) gtk_object_sink (obj); } -typedef void (* destroy_func) (GtkObject *obj); - -static destroy_func base_destroy; -static destroy_func managed_destroy; - -static void -my_destroy (GtkObject *obj) -{ - (* managed_destroy) (obj); - (* base_destroy) (obj); -} - -void -gtksharp_object_override_destroy (gpointer cb) -{ - GtkObjectClass *klass = (GtkObjectClass *) g_type_class_ref (GTK_TYPE_OBJECT); - base_destroy = klass->destroy; - managed_destroy = cb; - klass->destroy = my_destroy; -} -